aboutsummaryrefslogtreecommitdiffstats
path: root/wee_slack.py
diff options
context:
space:
mode:
authorTrygve Aaberge <trygveaa@gmail.com>2020-01-23 13:36:31 +0100
committerTrygve Aaberge <trygveaa@gmail.com>2020-01-23 14:09:18 +0100
commit8c509af8c82ce3f75671e51651d82c3fda99d00f (patch)
treef826d0c1c4b72cf0475e32590ec6128f4b23a3b1 /wee_slack.py
parent8a7663399a1ca723f008fd7ca3eb05aa662aab38 (diff)
downloadwee-slack-8c509af8c82ce3f75671e51651d82c3fda99d00f.tar.gz
Set members correctly in handle_conversationsmembers
Because this sat channel.members directly instead of calling set_members, the nicklist wasn't updated.
Diffstat (limited to 'wee_slack.py')
-rw-r--r--wee_slack.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/wee_slack.py b/wee_slack.py
index beb1c7f..f35a2af 100644
--- a/wee_slack.py
+++ b/wee_slack.py
@@ -2818,11 +2818,10 @@ def handle_conversationsreplies(message_json, eventrouter, **kwargs):
def handle_conversationsmembers(members_json, eventrouter, **kwargs):
request_metadata = members_json['wee_slack_request_metadata']
team = eventrouter.teams[request_metadata.team_hash]
+ channel = team.channels[request_metadata.channel_identifier]
if members_json['ok']:
- channel = team.channels[request_metadata.channel_identifier]
- channel.members = set(members_json['members'])
+ channel.set_members(members_json['members'])
else:
- channel = team.channels[request_metadata.channel_identifier]
w.prnt(team.channel_buffer, '{}Couldn\'t load members for channel {}. Error: {}'
.format(w.prefix('error'), channel.name, members_json['error']))