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
This commit is contained in:
parent
909ef8da53
commit
d664daad1a
|
@ -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)
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue