diff options
author | Ismaël Bouya <ismael.bouya@normalesup.org> | 2018-01-29 10:53:31 +0100 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@normalesup.org> | 2018-01-29 11:56:11 +0100 |
commit | 9369c3cb0106c81b9fdb1fdcd6201a50f61a8397 (patch) | |
tree | 49d86705685c79f55965f109e9bf6022dc3c8823 | |
parent | 8f08e20d0edb1a1aab692b54f507a70bc11a4320 (diff) | |
download | wee-slack-9369c3cb0106c81b9fdb1fdcd6201a50f61a8397.tar.gz |
Temporary fix user presence subscription crashing big teams
-rw-r--r-- | wee_slack.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/wee_slack.py b/wee_slack.py index 9b63dea..38f14b7 100644 --- a/wee_slack.py +++ b/wee_slack.py @@ -1152,9 +1152,14 @@ class SlackTeam(object): c.update_nicklist(user.id) def subscribe_users_presence(self): + # FIXME: There is a limitation in the API to the size of the + # json we can send. + # We should try to be smarter to fetch the users whom we want to + # subscribe to. + users = self.users.keys()[0:750] self.send_to_websocket({ "type": "presence_sub", - "ids": self.users.keys(), + "ids": users, }, expect_reply=False) class SlackChannel(object): |