aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTrygve Aaberge <trygveaa@gmail.com>2021-03-21 18:21:48 +0100
committerTrygve Aaberge <trygveaa@gmail.com>2021-03-21 18:29:36 +0100
commite92c969828c05a2b06c5718befd980b2943d1f1a (patch)
tree3d5539141a28b99b8118aab64fcd1a83ca594a6f
parentb7350e081916775c873415db7b060aff879d012c (diff)
downloadwee-slack-e92c969828c05a2b06c5718befd980b2943d1f1a.tar.gz
Call conversations.members for all channels
It turns out that some channels in rtm.start include a member list with a few users, but not all. Therefore, I don't know how we can know if the list is complete or not, so we have to call conversations.members for all channels. Fixes #829
-rw-r--r--wee_slack.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/wee_slack.py b/wee_slack.py
index 50ce389..95d1dbc 100644
--- a/wee_slack.py
+++ b/wee_slack.py
@@ -2466,7 +2466,10 @@ class SlackChannel(SlackChannelCommon):
self.print_getting_history()
self.pending_history_requests.add(self.identifier)
- if not self.members or self.members == set(self.team.myidentifier):
+ if not self.got_history:
+ # Slack has started returning only a few members for some channels
+ # in rtm.start. I don't know how we can check if the member list is
+ # complete, so we have to fetch members for all channels.
s = SlackRequest(
self.team,
"conversations.members",