From f4384af0f7b934c3dfe5889febeb0337680c836b Mon Sep 17 00:00:00 2001 From: Ryan Huber Date: Wed, 27 May 2015 08:23:24 -0700 Subject: more reaction fixes - don't show reactions to chans i'm not in --- wee_slack.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'wee_slack.py') diff --git a/wee_slack.py b/wee_slack.py index 58b93b5..a4089b7 100644 --- a/wee_slack.py +++ b/wee_slack.py @@ -559,16 +559,16 @@ class Channel(SlackThing): w.buffer_set(self.channel_buffer, "short_name", color + new_name) def buffer_prnt_changed(self, user, text, time, append=""): - if user: - if self.server.users.find(user): - name = self.server.users.find(user).formatted_name() + if self.channel_buffer: + if user: + if self.server.users.find(user): + name = self.server.users.find(user).formatted_name() + else: + name = user + name = name.decode('utf-8') + modify_buffer_line(self.channel_buffer, name, text, time, append) else: - name = user - name = name.decode('utf-8') - modify_buffer_line(self.channel_buffer, name, text, time, append) - else: - modify_buffer_line(self.channel_buffer, None, text, time, append) - return False + modify_buffer_line(self.channel_buffer, None, text, time, append) def buffer_prnt(self, user='unknown user', message='no message', time=0): set_read_marker = False -- cgit