File tree Expand file tree Collapse file tree 1 file changed +16
-1
lines changed
services/apps/data_sink_worker/src/service Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -188,7 +188,13 @@ export class OrganizationService extends LoggerBase {
188
188
'weakIdentities' ,
189
189
]
190
190
fields . forEach ( ( field ) => {
191
- if ( cached [ field ] && ! isEqual ( cached [ field ] , existing [ field ] ) ) {
191
+ if ( field === 'website' && ! existing . website ) {
192
+ updateData [ field ] = cached [ field ]
193
+ } else if (
194
+ field !== 'website' &&
195
+ cached [ field ] &&
196
+ ! isEqual ( cached [ field ] , existing [ field ] )
197
+ ) {
192
198
updateData [ field ] = cached [ field ]
193
199
}
194
200
} )
@@ -235,6 +241,15 @@ export class OrganizationService extends LoggerBase {
235
241
236
242
const identities = await txRepo . getIdentities ( id , tenantId )
237
243
244
+ // create identities with incoming website
245
+ if ( data . website ) {
246
+ data . identities . push ( {
247
+ name : websiteNormalizer ( data . website ) ,
248
+ platform : 'email' ,
249
+ integrationId,
250
+ } )
251
+ }
252
+
238
253
for ( const identity of data . identities ) {
239
254
const identityExists = identities . find (
240
255
( i ) => i . name === identity . name && i . platform === identity . platform ,
You can’t perform that action at this time.
0 commit comments