diff options
author | mathieui <mathieui@mathieui.net> | 2013-03-11 11:43:32 +0100 |
---|---|---|
committer | mathieui <mathieui@mathieui.net> | 2013-03-11 11:43:32 +0100 |
commit | 34af8f69c7aff2d02a10fab954ae7ddf15cee193 (patch) | |
tree | 28cafafe4fc859b319bb407409e0cba87d35f00e | |
parent | e4f72d05c396851b2fa78534155bca9fab04f96f (diff) | |
download | poezio-34af8f69c7aff2d02a10fab954ae7ddf15cee193.tar.gz poezio-34af8f69c7aff2d02a10fab954ae7ddf15cee193.tar.bz2 poezio-34af8f69c7aff2d02a10fab954ae7ddf15cee193.tar.xz poezio-34af8f69c7aff2d02a10fab954ae7ddf15cee193.zip |
Add a receive_user_tune option (fix #2261)
-rw-r--r-- | data/default_config.cfg | 6 | ||||
-rw-r--r-- | doc/en/configure.txt | 5 | ||||
-rw-r--r-- | src/connection.py | 6 |
3 files changed, 16 insertions, 1 deletions
diff --git a/data/default_config.cfg b/data/default_config.cfg index 48871906..dacfd91c 100644 --- a/data/default_config.cfg +++ b/data/default_config.cfg @@ -343,6 +343,12 @@ display_user_color_in_join_part = false # Display user tune notifications as information messages or not display_tune_notifications = false +# Receive the tune notifications or not (in order to display informations +# in the roster). +# If this is set to false, then the display_tune_notifications +# option will be ignored. +receive_user_tune = true + # if true, chat states will be sent to the people you are talking to. # Chat states are, for example, messages informing that you are composing # a message or that you closed the tab, etc diff --git a/doc/en/configure.txt b/doc/en/configure.txt index 1bf43af7..d0bc57b1 100644 --- a/doc/en/configure.txt +++ b/doc/en/configure.txt @@ -281,6 +281,11 @@ section of this documentation. If the message takes more than one line, the popup will stay visible two more second per additional lines. +*receive_user_tune*:: true + + If this is set to false, you will no longer be subscribed to tune events, + and the display_tune_notifications option will be ignored. + *remote_fifo_path*:: ./poezio.fifo The path of the FIFO used to send the commands (see the exec_remote option). diff --git a/src/connection.py b/src/connection.py index 5b5ecba2..51fef78d 100644 --- a/src/connection.py +++ b/src/connection.py @@ -70,8 +70,10 @@ class Connection(sleekxmpp.ClientXMPP): self.register_plugin('xep_0071') self.register_plugin('xep_0085') self.register_plugin('xep_0115') - self.register_plugin('xep_0118') self.register_plugin('xep_0191') + + if config.get('receive_user_tune', 'true') != 'false': + self.register_plugin('xep_0118') if config.get('send_poezio_info', 'true') == 'true': info = {'name':'poezio', 'version': options.version} @@ -87,6 +89,8 @@ class Connection(sleekxmpp.ClientXMPP): self.register_plugin('xep_0224') self.register_plugin('xep_0308') + self.plugin['xep_0115'].update_caps() + def start(self): # TODO, try multiple servers # With anon auth. |