handle presences before caps. Fixes #6046
This commit is contained in:
parent
1c9d56e7de
commit
c104199f6c
|
@ -1071,6 +1071,10 @@ ConnectionJingle, ConnectionIBBytestream):
|
||||||
ConnectionPubSub.__init__(self)
|
ConnectionPubSub.__init__(self)
|
||||||
ConnectionPEP.__init__(self, account=self.name, dispatcher=self,
|
ConnectionPEP.__init__(self, account=self.name, dispatcher=self,
|
||||||
pubsub_connection=self)
|
pubsub_connection=self)
|
||||||
|
|
||||||
|
# Handle presences BEFORE caps
|
||||||
|
gajim.nec.register_incoming_event(PresenceReceivedEvent)
|
||||||
|
|
||||||
ConnectionCaps.__init__(self, account=self.name,
|
ConnectionCaps.__init__(self, account=self.name,
|
||||||
dispatch_event=self.dispatch, capscache=capscache.capscache,
|
dispatch_event=self.dispatch, capscache=capscache.capscache,
|
||||||
client_caps_factory=capscache.create_suitable_client_caps)
|
client_caps_factory=capscache.create_suitable_client_caps)
|
||||||
|
@ -1104,7 +1108,6 @@ ConnectionJingle, ConnectionIBBytestream):
|
||||||
PrivateStorageRosternotesReceivedEvent)
|
PrivateStorageRosternotesReceivedEvent)
|
||||||
gajim.nec.register_incoming_event(RosternotesReceivedEvent)
|
gajim.nec.register_incoming_event(RosternotesReceivedEvent)
|
||||||
gajim.nec.register_incoming_event(StreamConflictReceivedEvent)
|
gajim.nec.register_incoming_event(StreamConflictReceivedEvent)
|
||||||
gajim.nec.register_incoming_event(PresenceReceivedEvent)
|
|
||||||
gajim.nec.register_incoming_event(MessageReceivedEvent)
|
gajim.nec.register_incoming_event(MessageReceivedEvent)
|
||||||
gajim.nec.register_incoming_event(ArchivingErrorReceivedEvent)
|
gajim.nec.register_incoming_event(ArchivingErrorReceivedEvent)
|
||||||
gajim.nec.register_incoming_event(
|
gajim.nec.register_incoming_event(
|
||||||
|
|
|
@ -48,6 +48,8 @@ class ConnectionCaps(object):
|
||||||
self._account = new_name
|
self._account = new_name
|
||||||
|
|
||||||
def _nec_caps_presence_received(self, obj):
|
def _nec_caps_presence_received(self, obj):
|
||||||
|
if obj.conn.name != self._account:
|
||||||
|
return
|
||||||
obj.client_caps = self._create_suitable_client_caps(obj.node,
|
obj.client_caps = self._create_suitable_client_caps(obj.node,
|
||||||
obj.caps_hash, obj.hash_method)
|
obj.caps_hash, obj.hash_method)
|
||||||
self._capscache.query_client_of_jid_if_unknown(self, obj.fjid,
|
self._capscache.query_client_of_jid_if_unknown(self, obj.fjid,
|
||||||
|
|
Loading…
Reference in New Issue