diff options
author | Trygve Aaberge <trygveaa@gmail.com> | 2019-06-03 17:13:32 +0200 |
---|---|---|
committer | Trygve Aaberge <trygveaa@gmail.com> | 2019-06-03 17:15:20 +0200 |
commit | 3df593a576c4ec6a111f06121755e73e6db24161 (patch) | |
tree | 8ae48f254fd1c42c47cf7ef8e546fee4ec49890a | |
parent | d1a326563d63f14cc01096f8fff75011f5264efa (diff) | |
download | wee-slack-3df593a576c4ec6a111f06121755e73e6db24161.tar.gz |
Check if channel is mpim by using is_mpim attribute
Haven't run into issues regarding this, but using the attribute instead
of the name is probably less likely to break in the future.
-rw-r--r-- | wee_slack.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/wee_slack.py b/wee_slack.py index 9849ac8..8fdf1b6 100644 --- a/wee_slack.py +++ b/wee_slack.py @@ -2609,7 +2609,7 @@ def handle_rtmstart(login_data, eventrouter): channels[item["id"]] = SlackDMChannel(eventrouter, users, **item) for item in login_data["groups"]: - if item["name"].startswith('mpdm-'): + if item["is_mpim"]: channels[item["id"]] = SlackMPDMChannel(eventrouter, users, **item) else: channels[item["id"]] = SlackGroupChannel(eventrouter, **item) |