@pipedream/slack 0.4.30 → 0.4.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -6,7 +6,7 @@ export default {
|
|
|
6
6
|
...common,
|
|
7
7
|
key: "slack-new-message-in-channels",
|
|
8
8
|
name: "New Message In Channels (Instant)",
|
|
9
|
-
version: "1.0.
|
|
9
|
+
version: "1.0.14",
|
|
10
10
|
description: "Emit new event when a new message is posted to one or more channels",
|
|
11
11
|
type: "source",
|
|
12
12
|
dedupe: "unique",
|
|
@@ -44,6 +44,12 @@ export default {
|
|
|
44
44
|
"ignoreBot",
|
|
45
45
|
],
|
|
46
46
|
},
|
|
47
|
+
ignoreThreads: {
|
|
48
|
+
type: "boolean",
|
|
49
|
+
label: "Ignore replies in threads",
|
|
50
|
+
description: "Ignore replies to messages in threads",
|
|
51
|
+
optional: true,
|
|
52
|
+
},
|
|
47
53
|
},
|
|
48
54
|
methods: {
|
|
49
55
|
...common.methods,
|
|
@@ -66,6 +72,13 @@ export default {
|
|
|
66
72
|
if ((this.ignoreBot) && (event.subtype == "bot_message" || event.bot_id)) {
|
|
67
73
|
return;
|
|
68
74
|
}
|
|
75
|
+
console.log(event.s);
|
|
76
|
+
// There is no thread message type only the thread_ts field
|
|
77
|
+
// indicates if the message is part of a thread in the event.
|
|
78
|
+
if (this.ignoreThreads && event.thread_ts) {
|
|
79
|
+
console.log("Ignoring reply in thread");
|
|
80
|
+
return;
|
|
81
|
+
}
|
|
69
82
|
if (this.resolveNames) {
|
|
70
83
|
if (event.user) {
|
|
71
84
|
event.user_id = event.user;
|