Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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/slack/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@pipedream/slack",
"version": "0.6.3",
"version": "0.6.4",
"description": "Pipedream Slack Components",
"main": "slack.app.mjs",
"keywords": [
Expand Down
16 changes: 11 additions & 5 deletions components/slack/sources/new-direct-message/new-direct-message.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default {
...common,
key: "slack-new-direct-message",
name: "New Direct Message (Instant)",
version: "1.0.17",
version: "1.0.18",
description: "Emit new event when a message was posted in a direct message channel",
type: "source",
dedupe: "unique",
Expand All @@ -27,17 +27,23 @@ export default {
"ignoreBot",
],
},
ignoreSelf: {
type: "boolean",
label: "Ignore Messages from Yourself",
description: "Ignores messages sent to yourself",
default: false,
optional: true,
},
},
methods: {
...common.methods,
getSummary() {
return "New direct message received";
},
processEvent(event) {
if (event.user == this.slack.mySlackId()) {
return;
}
if ((this.ignoreBot) && (event.subtype == "bot_message" || event.bot_id)) {
if ((this.ignoreSelf && event.user == this.slack.mySlackId())
|| ((this.ignoreBot) && (event.subtype === "bot_message" || event.bot_id))
|| (event.subtype === "message_changed")) {
return;
}
return event;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export default {
...common,
key: "slack-new-message-in-channels",
name: "New Message In Channels (Instant)",
version: "1.0.19",
version: "1.0.20",
description: "Emit new event when a new message is posted to one or more channels",
type: "source",
dedupe: "unique",
Expand Down Expand Up @@ -72,7 +72,6 @@ export default {
if ((this.ignoreBot) && (event.subtype == "bot_message" || event.bot_id)) {
return;
}
console.log(event.s);
// There is no thread message type only the thread_ts field
// indicates if the message is part of a thread in the event.
if (this.ignoreThreads && event.thread_ts) {
Expand Down