diff options
author | Trygve Aaberge <trygveaa@gmail.com> | 2020-01-22 21:10:16 +0100 |
---|---|---|
committer | Trygve Aaberge <trygveaa@gmail.com> | 2020-01-22 21:31:28 +0100 |
commit | 8a7663399a1ca723f008fd7ca3eb05aa662aab38 (patch) | |
tree | e5d68475750e0c6281654d5c47533a75e0a1f399 /wee_slack.py | |
parent | 2d0a1fe229a394d74aed27587a1c45e2163a7e73 (diff) | |
download | wee-slack-8a7663399a1ca723f008fd7ca3eb05aa662aab38.tar.gz |
Set channel.is_member when channel is created
The channel dict sent as kwargs to SlackChannel from handle_rtmstart
contains the is_member property. However the one from
process_channel_created doesn't. Since you never are a member when the
channel is created, we can set it to false (if you create the channel
yourself or is invited immediately a channel_joined message will follow
the channel_created message).
Diffstat (limited to 'wee_slack.py')
-rw-r--r-- | wee_slack.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/wee_slack.py b/wee_slack.py index cf67593..beb1c7f 100644 --- a/wee_slack.py +++ b/wee_slack.py @@ -3177,6 +3177,7 @@ def process_channel_joined(message_json, eventrouter, **kwargs): def process_channel_created(message_json, eventrouter, **kwargs): item = message_json["channel"] + item['is_member'] = False c = SlackChannel(eventrouter, team=kwargs["team"], **item) kwargs['team'].channels[item["id"]] = c kwargs['team'].buffer_prnt('Channel created: {}'.format(c.slack_name)) |