PR comment followups (isNonEmptyString and rename WorkflowExecutionResult) (#13706)

Addressing two comments from Thomas and Charles
This commit is contained in:
Félix Malfait
2025-08-06 22:09:30 +02:00
committed by GitHub
parent eab72d8e67
commit 453a6167a5
8 changed files with 25 additions and 22 deletions
@@ -1,5 +1,7 @@
import { Injectable } from '@nestjs/common';
import { isNonEmptyString } from '@sniptt/guards';
import { ConnectedAccountWorkspaceEntity } from 'src/modules/connected-account/standard-objects/connected-account.workspace-entity';
import {
MessageImportDriverException,
@@ -47,7 +49,7 @@ export class MicrosoftEmailAliasManagerService {
})
// @ts-expect-error legacy noImplicitAny
.filter((address) => {
return address !== '';
return isNonEmptyString(address);
}) || [];
return handleAliases;
@@ -150,10 +150,9 @@ export class CreateCompanyAndContactService {
filteredContactsToCreateWithCompanyDomainNames.map((contact) => ({
handle: contact.handle,
displayName: contact.displayName,
companyId:
contact.companyDomainName && contact.companyDomainName !== ''
? companiesObject[contact.companyDomainName]
: undefined,
companyId: isNonEmptyString(contact.companyDomainName)
? companiesObject[contact.companyDomainName]
: undefined,
createdBySource: source,
createdByWorkspaceMember: connectedAccount.accountOwner,
createdByContext: {