aboutsummaryrefslogtreecommitdiffstats
path: root/wee_slack.py
diff options
context:
space:
mode:
authorTrygve Aaberge <trygveaa@gmail.com>2020-03-02 20:46:47 +0100
committerTrygve Aaberge <trygveaa@gmail.com>2020-03-02 21:37:22 +0100
commitec783344a9bb079eb51ebc98a9b0390cab20558f (patch)
treee7b720947df804a8e5dc0ce9b6fb98962c23c6c5 /wee_slack.py
parente7f539527a3510ec04150a54f62b2c97522bfe57 (diff)
downloadwee-slack-ec783344a9bb079eb51ebc98a9b0390cab20558f.tar.gz
Ensure we are subscribed to our own presence
Slack doesn't send the presence_change event for our own user when it updates the auto presence unless we subscribe to it. The manual_presence_change however is sent either way.
Diffstat (limited to 'wee_slack.py')
-rw-r--r--wee_slack.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/wee_slack.py b/wee_slack.py
index ae38816..c30a6d9 100644
--- a/wee_slack.py
+++ b/wee_slack.py
@@ -1464,7 +1464,9 @@ class SlackTeam(object):
# json we can send.
# We should try to be smarter to fetch the users whom we want to
# subscribe to.
- users = list(self.users.keys())[0:750]
+ users = list(self.users.keys())[:750]
+ if self.myidentifier not in users:
+ users.append(self.myidentifier)
self.send_to_websocket({
"type": "presence_sub",
"ids": users,