@pipedream/slack 0.4.4 → 0.4.6
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/actions/{reply-to-a-message-thread/reply-to-a-message-thread.mjs → reply-to-a-message/reply-to-a-message.mjs} +1 -1
- package/actions/{set-purpose-of-channel/set-purpose-of-channel.mjs → set-channel-purpose/set-channel-purpose.mjs} +1 -1
- package/package.json +1 -1
- package/sources/common/base.mjs +20 -0
- package/sources/new-direct-message/new-direct-message.mjs +1 -1
- package/sources/new-mention/new-mention.mjs +1 -1
- package/sources/new-message-in-channels/new-message-in-channels.mjs +1 -1
- package/sources/new-reaction-added/new-reaction-added.mjs +3 -2
- package/sources/new-star-added/new-star-added.mjs +1 -1
|
@@ -6,7 +6,7 @@ export default {
|
|
|
6
6
|
key: "slack-reply-to-a-message",
|
|
7
7
|
name: "Reply to a Message Thread",
|
|
8
8
|
description: "Send a message as a threaded reply. See [postMessage](https://api.slack.com/methods/chat.postMessage) or [scheduleMessage](https://api.slack.com/methods/chat.scheduleMessage) docs here",
|
|
9
|
-
version: "0.1.
|
|
9
|
+
version: "0.1.10",
|
|
10
10
|
type: "action",
|
|
11
11
|
props: {
|
|
12
12
|
...common.props,
|
|
@@ -4,7 +4,7 @@ export default {
|
|
|
4
4
|
key: "slack-set-channel-purpose",
|
|
5
5
|
name: "Set Channel Purpose",
|
|
6
6
|
description: "Change the purpose of a channel. [See docs here](https://api.slack.com/methods/conversations.setPurpose)",
|
|
7
|
-
version: "0.0.
|
|
7
|
+
version: "0.0.8",
|
|
8
8
|
type: "action",
|
|
9
9
|
props: {
|
|
10
10
|
slack,
|
package/package.json
CHANGED
package/sources/common/base.mjs
CHANGED
|
@@ -71,9 +71,29 @@ export default {
|
|
|
71
71
|
limit: 1,
|
|
72
72
|
inclusive: true,
|
|
73
73
|
});
|
|
74
|
+
|
|
74
75
|
return info;
|
|
75
76
|
});
|
|
76
77
|
},
|
|
78
|
+
async getMessage({
|
|
79
|
+
channel, event_ts,
|
|
80
|
+
}) {
|
|
81
|
+
return await this.maybeCached(`lastMessage:${channel}:${event_ts}`, async () => {
|
|
82
|
+
const response = await this.slack.sdk().conversations.replies({
|
|
83
|
+
channel,
|
|
84
|
+
ts: event_ts,
|
|
85
|
+
limit: 1,
|
|
86
|
+
});
|
|
87
|
+
|
|
88
|
+
if (response.messages.length) {
|
|
89
|
+
response.messages = [
|
|
90
|
+
response.messages[0],
|
|
91
|
+
];
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
return response;
|
|
95
|
+
});
|
|
96
|
+
},
|
|
77
97
|
processEvent(event) {
|
|
78
98
|
return event;
|
|
79
99
|
},
|
|
@@ -4,7 +4,7 @@ export default {
|
|
|
4
4
|
...common,
|
|
5
5
|
key: "slack-new-direct-message",
|
|
6
6
|
name: "New Direct Message (Instant)",
|
|
7
|
-
version: "1.0.
|
|
7
|
+
version: "1.0.4",
|
|
8
8
|
description: "Emit new event when a message was posted in a direct message channel",
|
|
9
9
|
type: "source",
|
|
10
10
|
dedupe: "unique",
|
|
@@ -4,7 +4,7 @@ export default {
|
|
|
4
4
|
...common,
|
|
5
5
|
key: "slack-new-message-in-channels",
|
|
6
6
|
name: "New Message In Channels (Instant)",
|
|
7
|
-
version: "1.0.
|
|
7
|
+
version: "1.0.4",
|
|
8
8
|
description: "Emit new event when a new message is posted to one or more channels",
|
|
9
9
|
type: "source",
|
|
10
10
|
dedupe: "unique",
|
|
@@ -4,7 +4,7 @@ export default {
|
|
|
4
4
|
...common,
|
|
5
5
|
key: "slack-new-reaction-added",
|
|
6
6
|
name: "New Reaction Added (Instant)",
|
|
7
|
-
version: "1.1.
|
|
7
|
+
version: "1.1.5",
|
|
8
8
|
description: "Emit new event when a member has added an emoji reaction to an item",
|
|
9
9
|
type: "source",
|
|
10
10
|
dedupe: "unique",
|
|
@@ -54,7 +54,8 @@ export default {
|
|
|
54
54
|
if ((this.ignoreBot) && (event.subtype == "bot_message" || event.bot_id)) {
|
|
55
55
|
return;
|
|
56
56
|
}
|
|
57
|
-
|
|
57
|
+
|
|
58
|
+
event.message = await this.getMessage({
|
|
58
59
|
channel: event.item.channel,
|
|
59
60
|
event_ts: event.item.ts,
|
|
60
61
|
});
|