From d664daad1a715bb5fe8e1eff7aac7089a5520411 Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Thu, 19 Nov 2009 20:36:40 +0100 Subject: [PATCH] we can now send pep thing to a zeroconf connection objec, it will just send nothing. so GUI doesn't have to know it's a zeroconf connection or not. fixes #5432 --- src/common/zeroconf/connection_handlers_zeroconf.py | 3 ++- src/gui_interface.py | 2 -- src/roster_window.py | 6 +----- 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/src/common/zeroconf/connection_handlers_zeroconf.py b/src/common/zeroconf/connection_handlers_zeroconf.py index b08fba1ce..4ea0e65bb 100644 --- a/src/common/zeroconf/connection_handlers_zeroconf.py +++ b/src/common/zeroconf/connection_handlers_zeroconf.py @@ -35,6 +35,7 @@ from common import helpers from common import gajim from common.zeroconf import zeroconf from common.commands import ConnectionCommands +from common.pep import ConnectionPEP import logging log = logging.getLogger('gajim.c.z.connection_handlers_zeroconf') @@ -376,7 +377,7 @@ class ConnectionBytestream(connection_handlers.ConnectionBytestream): raise common.xmpp.NodeProcessed class ConnectionHandlersZeroconf(ConnectionVcard, ConnectionBytestream, -ConnectionCommands, connection_handlers.ConnectionHandlersBase): +ConnectionCommands, ConnectionPEP, connection_handlers.ConnectionHandlersBase): def __init__(self): ConnectionVcard.__init__(self) ConnectionBytestream.__init__(self) diff --git a/src/gui_interface.py b/src/gui_interface.py index 9cb53d646..98c1f3298 100644 --- a/src/gui_interface.py +++ b/src/gui_interface.py @@ -2812,8 +2812,6 @@ class Interface: for acct in accounts: if not gajim.account_is_connected(acct): continue - if gajim.connections[acct].is_zeroconf: - continue if not gajim.config.get_per('accounts', acct, 'publish_tune'): continue if gajim.connections[acct].music_track_info == music_track_info: diff --git a/src/roster_window.py b/src/roster_window.py index 25780f85c..6e3bcdc2d 100644 --- a/src/roster_window.py +++ b/src/roster_window.py @@ -1898,9 +1898,7 @@ class RosterWindow: def send_pep(self, account, pep_dict): connection = gajim.connections[account] - if connection.is_zeroconf: - return - + if 'activity' in pep_dict: activity = pep_dict['activity'] subactivity = pep_dict.get('subactivity', None) @@ -1917,8 +1915,6 @@ class RosterWindow: connection.retract_mood() def delete_pep(self, jid, account): - if gajim.connections[account].is_zeroconf: - return if jid == gajim.get_jid_from_account(account): gajim.connections[account].pep = {} self.draw_account(account)