File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -37,6 +37,7 @@ import {
37
37
} from './pubsub-contacts-message.model' ;
38
38
import { PubSubContactsChangedClient } from './pubsub-contacts-changed-client.model' ;
39
39
import { PubSubContactChangeEventMessage } from './pubsub-contacts-changed-message.model' ;
40
+ import { isEqual , uniqWith } from 'lodash' ;
40
41
41
42
const CONTACT_FETCH_TIMEOUT = 5000 ;
42
43
@@ -1385,7 +1386,9 @@ export class Controller {
1385
1386
'' ,
1386
1387
) ;
1387
1388
1388
- changeEvents . map ( ( changeEvent : ContactChangeEvent ) => {
1389
+ const deduplicatedChangeEvents = uniqWith ( changeEvents , isEqual ) ;
1390
+
1391
+ deduplicatedChangeEvents . map ( ( changeEvent : ContactChangeEvent ) => {
1389
1392
infoLogger (
1390
1393
'handleWebhook' ,
1391
1394
`Publishing contact change event with accountId ${ changeEvent . accountId } and contactId ${ changeEvent . contactId } ` ,
You can’t perform that action at this time.
0 commit comments