From ec783344a9bb079eb51ebc98a9b0390cab20558f Mon Sep 17 00:00:00 2001 From: Trygve Aaberge Date: Mon, 2 Mar 2020 20:46:47 +0100 Subject: 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. --- wee_slack.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'wee_slack.py') 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, -- cgit