@@ -2,9 +2,7 @@ import { COMMITTEES_GRID, CommitteesActivityType } from '@crowd/integrations'
22import { getServiceChildLogger } from '@crowd/logging'
33import {
44 IActivityData ,
5- IMemberData ,
65 IOrganizationIdentity ,
7- MemberIdentityType ,
86 OrganizationIdentityType ,
97 OrganizationSource ,
108 PlatformType ,
@@ -43,43 +41,8 @@ export class CommitteesCommitteesTransformer extends TransformerBase {
4341 ? CommitteesActivityType . REMOVED_FROM_COMMITTEE
4442 : CommitteesActivityType . ADDED_TO_COMMITTEE
4543
46- const identities : IMemberData [ 'identities' ] = [ ]
47-
48- if ( lfUsername ) {
49- identities . push (
50- {
51- platform : PlatformType . COMMITTEES ,
52- value : email ,
53- type : MemberIdentityType . EMAIL ,
54- verified : true ,
55- verifiedBy : PlatformType . COMMITTEES ,
56- } ,
57- {
58- platform : PlatformType . COMMITTEES ,
59- value : lfUsername ,
60- type : MemberIdentityType . USERNAME ,
61- verified : true ,
62- verifiedBy : PlatformType . COMMITTEES ,
63- } ,
64- {
65- platform : PlatformType . LFID ,
66- value : lfUsername ,
67- type : MemberIdentityType . USERNAME ,
68- verified : true ,
69- verifiedBy : PlatformType . COMMITTEES ,
70- } ,
71- )
72- }
73-
74- if ( ! lfUsername ) {
75- identities . push ( {
76- platform : PlatformType . COMMITTEES ,
77- value : email ,
78- type : MemberIdentityType . USERNAME ,
79- verified : true ,
80- verifiedBy : PlatformType . COMMITTEES ,
81- } )
82- }
44+ const sourceId = ( row . PRIMARY_SOURCE_USER_ID as string | null ) ?. trim ( ) || undefined
45+ const identities = this . buildMemberIdentities ( { email, sourceId, lfUsername } )
8346
8447 const activityTimestamp =
8548 type === CommitteesActivityType . ADDED_TO_COMMITTEE
0 commit comments