aboutsummaryrefslogtreecommitdiffstats
path: root/wee_slack.py
diff options
context:
space:
mode:
authorJason Kölker <jason@koelker.net>2016-06-22 18:29:55 +0000
committerTollef Fog Heen <tfheen@err.no>2016-06-29 20:50:34 +0200
commitcc90a4f0368b54930544ababdb324e4a49cfb254 (patch)
tree0ba14b9c0164963e6e20a05d5c73eb3064793a29 /wee_slack.py
parent6664f5ebd6aea1d0f308996ff8ddd51842226388 (diff)
downloadwee-slack-cc90a4f0368b54930544ababdb324e4a49cfb254.tar.gz
Skip set_(in)active if user is deleted
Prevents the traceback: Traceback (most recent call last): File "wee_slack.py", line 1361, in slack_websocket_cb proc[function_name](message_json) File "wee_slack.py", line 1417, in process_presence_change server.users.find(identifier).set_active() File "wee_slack.py", line 860, in set_active w.nicklist_nick_set(self.server.buffer, self.nicklist_pointer, "visible", "1") AttributeError: 'User' object has no attribute 'nicklist_pointer'
Diffstat (limited to 'wee_slack.py')
-rw-r--r--wee_slack.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/wee_slack.py b/wee_slack.py
index 072b06c..cbe98ec 100644
--- a/wee_slack.py
+++ b/wee_slack.py
@@ -853,6 +853,9 @@ class User(object):
return [self.name, "@" + self.name, self.identifier]
def set_active(self):
+ if self.deleted:
+ return
+
self.presence = "active"
for channel in self.server.channels:
if channel.has_user(self.identifier):
@@ -863,6 +866,9 @@ class User(object):
buffer_list_update_next()
def set_inactive(self):
+ if self.deleted:
+ return
+
self.presence = "away"
for channel in self.server.channels:
if channel.has_user(self.identifier):