Skip to content

Commit

Permalink
pass members into group and channel creation
Browse files Browse the repository at this point in the history
  • Loading branch information
elementc committed Feb 28, 2016
1 parent ac343ca commit 48f299f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions slackclient/_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ def api_call(self, method, **kwargs):
if self.server:
if method == 'im.open':
if "ok" in result and result["ok"]:
self.server.attach_channel(kwargs["user"], result["channel"]["id"], [])
self.server.attach_channel(kwargs["user"], result["channel"]["id"])
elif method in ('mpim.open', 'groups.create', 'groups.createchild'):
if "ok" in result and result["ok"]:
self.server.attach_channel(result['group']['name'], result['group']['id'], [])
self.server.attach_channel(result['group']['name'], result['group']['id'], result['group']['members'])

This comment has been minimized.

Copy link
@elementc

elementc Feb 28, 2016

Author Contributor

@l12s that should fix it. reran my tests and they didn't crash.

elif method in ('channels.create', 'channels.join'):
if 'ok' in result and result['ok']:
self.server.attach_channel(result['channel']['name'], result['channel']['id'])
self.server.attach_channel(result['channel']['name'], result['channel']['id'], result['channel']['members'])
return result

def rtm_read(self):
Expand Down

0 comments on commit 48f299f

Please sign in to comment.