aboutsummaryrefslogtreecommitdiffstats
path: root/wee_slack.py
diff options
context:
space:
mode:
Diffstat (limited to 'wee_slack.py')
-rw-r--r--wee_slack.py20
1 files changed, 11 insertions, 9 deletions
diff --git a/wee_slack.py b/wee_slack.py
index 1dc7fed..5af9cca 100644
--- a/wee_slack.py
+++ b/wee_slack.py
@@ -476,17 +476,19 @@ class Channel(object):
self.active = False
def set_typing(self, user):
- if w.buffer_get_integer(self.channel_buffer, "hidden") == 0:
- self.typing[user] = time.time()
- buffer_list_update_next()
+ if self.channel_buffer:
+ if w.buffer_get_integer(self.channel_buffer, "hidden") == 0:
+ self.typing[user] = time.time()
+ buffer_list_update_next()
def unset_typing(self, user):
- if w.buffer_get_integer(self.channel_buffer, "hidden") == 0:
- try:
- del self.typing[user]
- buffer_list_update_next()
- except:
- pass
+ if self.channel_buffer:
+ if w.buffer_get_integer(self.channel_buffer, "hidden") == 0:
+ try:
+ del self.typing[user]
+ buffer_list_update_next()
+ except:
+ pass
def send_message(self, message):
message = self.linkify_text(message)