Add a receive_user_tune option (fix #2261)

This commit is contained in:
mathieui 2013-03-11 11:43:32 +01:00
parent e4f72d05c3
commit 34af8f69c7
3 changed files with 16 additions and 1 deletions

View file

@ -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

View file

@ -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).

View file

@ -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.