Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion components/intercom/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@pipedream/intercom",
"version": "0.6.0",
"version": "0.6.1",
"description": "Pipedream Intercom Components",
"main": "intercom.app.mjs",
"keywords": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,18 @@ export default {
key: "intercom-new-conversation-rating-added",
name: "New Conversation Rating Added",
description: "Emit new event each time a new rating is added to a conversation.",
version: "0.0.3",
version: "0.0.4",
type: "source",
dedupe: "unique",
props: {
...common.props,
newConversationsOnly: {
type: "boolean",
label: "New Conversations Only",
description: "Set to `true` to only emit events for new conversations",
optional: true,
},
},
methods: {
...common.methods,
generateMeta(conversation) {
Expand All @@ -34,8 +43,10 @@ export default {
const createdAt = conversation.conversation_rating.created_at;
if (createdAt > lastRatingCreatedAt)
lastRatingCreatedAt = createdAt;
const meta = this.generateMeta(conversation);
this.$emit(conversation, meta);
if (!this.newConversationsOnly || conversation.created_at > lastRatingCreatedAt) {
const meta = this.generateMeta(conversation);
this.$emit(conversation, meta);
}
}

this._setLastUpdate(lastRatingCreatedAt);
Expand Down
Loading