diff options
author | Ryan Huber <rhuber@gmail.com> | 2014-10-24 16:41:04 -0700 |
---|---|---|
committer | Ryan Huber <rhuber@gmail.com> | 2014-10-24 16:41:04 -0700 |
commit | eadea1d2efd2bb8a7c247932b631cbe93b31dcd1 (patch) | |
tree | 23b52bd738925dcb11b763b0b256a0ead5b8d5d3 /wee_slack.py | |
parent | af21d0613bb7022bba6da511860d85f1a5ad2d7d (diff) | |
download | wee-slack-eadea1d2efd2bb8a7c247932b631cbe93b31dcd1.tar.gz |
only send typing if channel found
Diffstat (limited to 'wee_slack.py')
-rw-r--r-- | wee_slack.py | 9 |
1 files changed, 5 insertions, 4 deletions
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 |