diff options
author | Trygve Aaberge <trygveaa@gmail.com> | 2022-09-18 15:58:29 +0200 |
---|---|---|
committer | Trygve Aaberge <trygveaa@gmail.com> | 2022-09-18 18:14:23 +0200 |
commit | 46bc2a9ff257c7005db9be8e069d9877ff8ef5f1 (patch) | |
tree | 54b50be145f35665e64b585e57921cd5d6677b9a | |
parent | 48f8ccb1b40f8d3a54a244a824aa506ae8dc43e8 (diff) | |
download | wee-slack-46bc2a9ff257c7005db9be8e069d9877ff8ef5f1.tar.gz |
Check if channel is mpim before shared on load
On one of my teams, all the MPIMs have is_shared set to true and the
name is not set correctly if they are created as SlackSharedChannel
instead of SlackMPDMChannel.
-rw-r--r-- | wee_slack.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/wee_slack.py b/wee_slack.py index 5ae62f8..0984e0e 100644 --- a/wee_slack.py +++ b/wee_slack.py @@ -6941,12 +6941,12 @@ def initiate_connection(token): def create_channel_from_info(eventrouter, channel_info, team, myidentifier, users): if channel_info.get("is_im"): return SlackDMChannel(eventrouter, users, team=team, **channel_info) - elif channel_info.get("is_shared"): - return SlackSharedChannel(eventrouter, team=team, **channel_info) elif channel_info.get("is_mpim"): return SlackMPDMChannel( eventrouter, users, myidentifier, team=team, **channel_info ) + elif channel_info.get("is_shared"): + return SlackSharedChannel(eventrouter, team=team, **channel_info) elif channel_info.get("is_private"): return SlackPrivateChannel(eventrouter, team=team, **channel_info) else: |