@pipedream/slack 0.6.3 → 0.6.4

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pipedream/slack",
3
- "version": "0.6.3",
3
+ "version": "0.6.4",
4
4
  "description": "Pipedream Slack Components",
5
5
  "main": "slack.app.mjs",
6
6
  "keywords": [
@@ -5,7 +5,7 @@ export default {
5
5
  ...common,
6
6
  key: "slack-new-direct-message",
7
7
  name: "New Direct Message (Instant)",
8
- version: "1.0.17",
8
+ version: "1.0.18",
9
9
  description: "Emit new event when a message was posted in a direct message channel",
10
10
  type: "source",
11
11
  dedupe: "unique",
@@ -27,6 +27,13 @@ export default {
27
27
  "ignoreBot",
28
28
  ],
29
29
  },
30
+ ignoreSelf: {
31
+ type: "boolean",
32
+ label: "Ignore Messages from Yourself",
33
+ description: "Ignores messages sent to yourself",
34
+ default: false,
35
+ optional: true,
36
+ },
30
37
  },
31
38
  methods: {
32
39
  ...common.methods,
@@ -34,10 +41,9 @@ export default {
34
41
  return "New direct message received";
35
42
  },
36
43
  processEvent(event) {
37
- if (event.user == this.slack.mySlackId()) {
38
- return;
39
- }
40
- if ((this.ignoreBot) && (event.subtype == "bot_message" || event.bot_id)) {
44
+ if ((this.ignoreSelf && event.user == this.slack.mySlackId())
45
+ || ((this.ignoreBot) && (event.subtype === "bot_message" || event.bot_id))
46
+ || (event.subtype === "message_changed")) {
41
47
  return;
42
48
  }
43
49
  return event;
@@ -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.19",
9
+ version: "1.0.20",
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",
@@ -72,7 +72,6 @@ export default {
72
72
  if ((this.ignoreBot) && (event.subtype == "bot_message" || event.bot_id)) {
73
73
  return;
74
74
  }
75
- console.log(event.s);
76
75
  // There is no thread message type only the thread_ts field
77
76
  // indicates if the message is part of a thread in the event.
78
77
  if (this.ignoreThreads && event.thread_ts) {