stream features: fix old "session" establishment
As it is and old and deprecated code path, nobody noticed that it was broken by the new filtering code. Fix #3468
This commit is contained in:
parent
82ff68cfac
commit
914ce40fd5
@ -1318,10 +1318,16 @@ class XMLStream(asyncio.BaseProtocol):
|
|||||||
# Avoid circular imports
|
# Avoid circular imports
|
||||||
from slixmpp.stanza.rootstanza import RootStanza
|
from slixmpp.stanza.rootstanza import RootStanza
|
||||||
from slixmpp.stanza import Iq, Handshake
|
from slixmpp.stanza import Iq, Handshake
|
||||||
passthrough = (
|
|
||||||
(isinstance(data, Iq) and data.get_plugin('bind', check=True))
|
passthrough = False
|
||||||
or isinstance(data, Handshake)
|
if isinstance(data, Iq):
|
||||||
)
|
if data.get_plugin('bind', check=True):
|
||||||
|
passthrough = True
|
||||||
|
elif data.get_plugin('session', check=True):
|
||||||
|
passthrough = True
|
||||||
|
elif isinstance(data, Handshake):
|
||||||
|
passthrough = True
|
||||||
|
|
||||||
if isinstance(data, (RootStanza, str)) and not passthrough:
|
if isinstance(data, (RootStanza, str)) and not passthrough:
|
||||||
self.__queued_stanzas.append((data, use_filters))
|
self.__queued_stanzas.append((data, use_filters))
|
||||||
log.debug('NOT SENT: %s %s', type(data), data)
|
log.debug('NOT SENT: %s %s', type(data), data)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user