From 11d4fc4961fd625f734930742aabc81c514d1acc Mon Sep 17 00:00:00 2001 From: jason Date: Wed, 8 Nov 2017 14:51:21 -0700 Subject: Add option to disable sending typing notification to Slack - Many IM clients that support alerting the receiving user that you're typing include an option to disable this behavior. This commit adds the `send_typing_notice` boolean option. When it is false `typing_notification_cb` is not registered for the `input_text_changed` Weechat signal. By default this option is true. --- wee_slack.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'wee_slack.py') diff --git a/wee_slack.py b/wee_slack.py index 274e05e..093767a 100644 --- a/wee_slack.py +++ b/wee_slack.py @@ -3332,7 +3332,8 @@ def setup_hooks(): w.hook_signal('buffer_switch', "buffer_switch_callback", "EVENTROUTER") w.hook_signal('window_switch', "buffer_switch_callback", "EVENTROUTER") w.hook_signal('quit', "quit_notification_cb", "") - w.hook_signal('input_text_changed', "typing_notification_cb", "") + if config.send_typing_notice: + w.hook_signal('input_text_changed', "typing_notification_cb", "") w.hook_command( # Command name and description @@ -3455,6 +3456,10 @@ class PluginConfig(object): default='italic', desc='When receiving bold text from Slack, render it as this in weechat.' ' If your terminal lacks italic support, consider using "underline" instead.'), + 'send_typing_notice': Setting( + default='true', + desc='Alert Slack users when you are typing a message in the input bar ' + '(Requires reload)'), 'server_aliases': Setting( default='', desc='A comma separated list of `subdomain:alias` pairs. The alias' -- cgit