Skip to content
This repository was archived by the owner on Jan 19, 2023. It is now read-only.

Commit 58f5e54

Browse files
committed
Merge pull request slackapi#244 from LearnersGuild/support-channel-ids
support channel_id in addition to channel_name in `send` and `customMessage`
2 parents 2ed628d + cc08817 commit 58f5e54

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/slack.coffee

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,7 @@ class SlackBot extends Adapter
202202

203203
send: (envelope, messages...) ->
204204
channel = @client.getChannelGroupOrDMByName envelope.room
205+
channel = @client.getChannelGroupOrDMByID(envelope.room) unless channel
205206

206207
if not channel and @client.getUserByName(envelope.room)
207208
user_id = @client.getUserByName(envelope.room).id
@@ -279,6 +280,7 @@ class SlackBot extends Adapter
279280
else data.message.room
280281

281282
channel = @client.getChannelGroupOrDMByName channelName
283+
channel = @client.getChannelGroupOrDMByID(channelName) unless channel
282284
return unless channel
283285

284286
msg = {}

0 commit comments

Comments
 (0)