aboutsummaryrefslogtreecommitdiffstats
path: root/wee_slack.py
diff options
context:
space:
mode:
authorTrygve Aaberge <trygveaa@gmail.com>2021-03-06 13:56:32 +0100
committerTrygve Aaberge <trygveaa@gmail.com>2021-03-06 14:13:37 +0100
commit86b2f0d2c0e623855ddc3f60a19849f1b88c35ef (patch)
treecd8ff36347ca920804e08d322ab2f7a49a3d828c /wee_slack.py
parentfab39b2e642b70a3f6bd510de0fb1b6034eb4ed0 (diff)
downloadwee-slack-86b2f0d2c0e623855ddc3f60a19849f1b88c35ef.tar.gz
Increase the number of channel members we fetch
conversations.members only returns 100 members if we don't specify limit, and requires pagination to get the rest. We want to know more members than that, so specify a limit of 1000, which is the max we can specify. If a channel has more than 1000 members, we would have to use papagination to get all, but I'll just do this simple change for now.
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 1b0ba54..ba0728e 100644
--- a/wee_slack.py
+++ b/wee_slack.py
@@ -2424,7 +2424,7 @@ class SlackSharedChannel(SlackChannel):
def get_history(self, slow_queue=False, full=False, no_log=False):
# Fetch members since they aren't included in rtm.start
- s = SlackRequest(self.team, 'conversations.members', {'channel': self.identifier}, channel=self)
+ s = SlackRequest(self.team, 'conversations.members', {'channel': self.identifier, 'limit': 1000}, channel=self)
self.eventrouter.receive(s)
super(SlackSharedChannel, self).get_history(slow_queue, full, no_log)