aboutsummaryrefslogtreecommitdiffstats
path: root/wee_slack.py
diff options
context:
space:
mode:
Diffstat (limited to 'wee_slack.py')
-rw-r--r--wee_slack.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/wee_slack.py b/wee_slack.py
index 57df9cd..a6f1e21 100644
--- a/wee_slack.py
+++ b/wee_slack.py
@@ -297,7 +297,7 @@ class SlackServer(object):
def create_slack_mappings(self, data):
for item in data["users"]:
- self.users.append(User(self, item["name"], item["id"], item["presence"]))
+ self.users.append(User(self, item["name"], item["id"], item["presence"], item["deleted"]))
for item in data["channels"]:
if "last_read" not in item:
@@ -424,6 +424,8 @@ class Channel(SlackThing):
try:
for user in self.members:
user = self.server.users.find(user)
+ if user.deleted:
+ continue
if user.presence == 'away':
w.nicklist_add_nick(self.channel_buffer, "", user.name, user.color_name, " ", "", 1)
else:
@@ -666,9 +668,10 @@ class DmChannel(Channel):
class User(SlackThing):
- def __init__(self, server, name, identifier, presence="away"):
+ def __init__(self, server, name, identifier, presence="away", deleted=False):
super(User, self).__init__(name, identifier)
self.channel_buffer = w.info_get("irc_buffer", "{}.{}".format(domain, self.name))
+ self.deleted = deleted
self.presence = presence
self.server = server
self.update_color()