diff options
author | Trygve Aaberge <trygveaa@gmail.com> | 2023-09-22 16:50:37 +0200 |
---|---|---|
committer | Trygve Aaberge <trygveaa@gmail.com> | 2023-09-22 16:50:37 +0200 |
commit | 49ea42f1e1c5f6acf0a6d579600a0db443b343a4 (patch) | |
tree | 429f8c8062510053d423d7d0cfe22c60e65c70a7 /wee_slack.py | |
parent | 870a704e7e182d4bba2ed18f20493af1f22e9c5c (diff) | |
download | wee-slack-49ea42f1e1c5f6acf0a6d579600a0db443b343a4.tar.gz |
Fix being invited to a private channel not working
If someone invited you to a private channel, it wouldn't work because
the channel would be unknown to wee-slack and the join function didn't
create a new channel instance.
Diffstat (limited to 'wee_slack.py')
-rw-r--r-- | wee_slack.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/wee_slack.py b/wee_slack.py index 5567f09..239a839 100644 --- a/wee_slack.py +++ b/wee_slack.py @@ -4351,7 +4351,14 @@ def process_thread_marked(message_json, eventrouter, team, channel, metadata): def process_channel_joined(message_json, eventrouter, team, channel, metadata): - channel.update_from_message_json(message_json["channel"]) + if channel is None: + channel = create_channel_from_info( + eventrouter, message_json["channel"], team, team.myidentifier, team.users + ) + team.channels[message_json["channel"]["id"]] = channel + else: + channel.update_from_message_json(message_json["channel"]) + channel.open() |