Skip to content

Commit 3585f78

Browse files
committed
enhance id with membershipTimestamp
1 parent b172bdf commit 3585f78

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

components/hubspot/sources/new-contact-added-to-list/new-contact-added-to-list.mjs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,15 @@ export default {
5656
return Date.now();
5757
},
5858
generateMeta(membership, listInfo) {
59-
const { recordId } = membership;
60-
const ts = this.getTs();
59+
const {
60+
recordId, membershipTimestamp,
61+
} = membership;
62+
const ts = membershipTimestamp
63+
? new Date(membershipTimestamp).getTime()
64+
: this.getTs();
6165

6266
return {
63-
id: `${listInfo.listId}-${recordId}`,
67+
id: `${listInfo.listId}-${recordId}-${ts}`,
6468
summary: `Contact ${recordId} added to list: ${listInfo.name}`,
6569
ts,
6670
};

pnpm-lock.yaml

Lines changed: 1 addition & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)