aboutsummaryrefslogtreecommitdiffstats
path: root/wee_slack.py
diff options
context:
space:
mode:
authorTrygve Aaberge <trygveaa@gmail.com>2022-01-30 17:33:34 +0100
committerTrygve Aaberge <trygveaa@gmail.com>2022-09-17 18:56:26 +0200
commit3e81d934282e0067be8d9e8289a14b829d44f687 (patch)
tree54353079f5d3c5aa37def61cc71a35be050b97d1 /wee_slack.py
parent5a957b05a3b5f5707ad30b73d4440f2dc974d9bf (diff)
downloadwee-slack-3e81d934282e0067be8d9e8289a14b829d44f687.tar.gz
Check if members is not empty in SlackMPDMChannel
If you use an xoxc token, the conversations.list endpoint returns an empty list for members of mpdms that have is_group set to true, which made this fail.
Diffstat (limited to 'wee_slack.py')
-rw-r--r--wee_slack.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/wee_slack.py b/wee_slack.py
index e0b32e1..98f0c0b 100644
--- a/wee_slack.py
+++ b/wee_slack.py
@@ -2896,7 +2896,7 @@ class SlackMPDMChannel(SlackChannel):
"""
def __init__(self, eventrouter, team_users, myidentifier, **kwargs):
- if "members" in kwargs:
+ if kwargs.get("members"):
kwargs["name"] = self.name_from_members(
team_users, kwargs["members"], myidentifier
)