From eadea1d2efd2bb8a7c247932b631cbe93b31dcd1 Mon Sep 17 00:00:00 2001 From: Ryan Huber Date: Fri, 24 Oct 2014 16:41:04 -0700 Subject: only send typing if channel found --- wee_slack.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'wee_slack.py') diff --git a/wee_slack.py b/wee_slack.py index c9c97be..ff40278 100644 --- a/wee_slack.py +++ b/wee_slack.py @@ -761,10 +761,11 @@ def typing_notification_cb(signal, sig_type, data): # try: # for server in servers: channel = channels.find(current_buffer_name()) - identifier = channel.identifier - request = {"type":"typing","channel":identifier} - channel.server.ws.send(json.dumps(request)) - typing_timer = now + if channel: + identifier = channel.identifier + request = {"type":"typing","channel":identifier} + channel.server.ws.send(json.dumps(request)) + typing_timer = now # except: # pass return w.WEECHAT_RC_OK -- cgit