Skip to content

Commit efec236

Browse files
authored
fix: only notify UI users after member merges (#4382)
Signed-off-by: Yeganathan S <63534555+skwowet@users.noreply.github.com>
1 parent 1987d18 commit efec236

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

services/libs/common_services/src/services/common.member.service.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import {
2020
sanitizeMemberOrganizationDateRange,
2121
} from '@crowd/common'
2222
import {
23+
ActorType,
2324
MEMBER_MERGE_FIELDS,
2425
MemberField,
2526
QueryExecutor,
@@ -316,7 +317,10 @@ export class CommonMemberService extends LoggerBase {
316317
}
317318
}
318319

319-
const actorId = buildAuditLogOptions(options)?.actorId
320+
const audit = buildAuditLogOptions(options)
321+
322+
const actorId = audit?.actorId
323+
const notifyUserId = audit?.actorType === ActorType.USER ? actorId : undefined
320324

321325
const mergeActions = await queryMergeActions(this.qx, {
322326
fields: ['id', 'state'],
@@ -472,7 +476,7 @@ export class CommonMemberService extends LoggerBase {
472476
retry: {
473477
maximumAttempts: 10,
474478
},
475-
args: [originalId, toMergeId, original.displayName, toMerge.displayName, actorId],
479+
args: [originalId, toMergeId, original.displayName, toMerge.displayName, notifyUserId],
476480
searchAttributes: {
477481
TenantId: [DEFAULT_TENANT_ID],
478482
},

0 commit comments

Comments
 (0)