Skip to content
This repository was archived by the owner on Aug 15, 2022. It is now read-only.

Commit 3ec618d

Browse files
committed
handle groups
1 parent 21af060 commit 3ec618d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

rtmbot/core.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,9 @@ def output(self):
122122
if destination.startswith('U'):
123123
result = json.loads(self.slack_client.api_call('im.open', user=destination))
124124
channel = self.slack_client.server.channels.find(result[u'channel'][u'id'])
125+
elif destination.startswith('G'):
126+
result = json.loads(self.slack_client.api_call('groups.open'), channel=destination))
127+
channel = self.slack_client.server.channels.find(result[u'channel'][u'id'])
125128
else:
126129
channel = self.slack_client.server.channels.find(destination)
127130
if channel != None and message != None:

0 commit comments

Comments
 (0)