diff --git a/src/common/connection_handlers.py b/src/common/connection_handlers.py index 980ea9e7a..2b59759a1 100644 --- a/src/common/connection_handlers.py +++ b/src/common/connection_handlers.py @@ -428,7 +428,7 @@ class ConnectionBytestream: if real_id == self.awaiting_xmpp_ping_id: self.awaiting_xmpp_ping_id = None return - if real_id[:3] != 'au_': + if not real_id.startswith('au_'): return frm = helpers.get_full_jid_from_iq(iq_obj) id = real_id[3:] diff --git a/src/common/zeroconf/connection_handlers_zeroconf.py b/src/common/zeroconf/connection_handlers_zeroconf.py index 848bdff9e..e83556416 100644 --- a/src/common/zeroconf/connection_handlers_zeroconf.py +++ b/src/common/zeroconf/connection_handlers_zeroconf.py @@ -454,7 +454,7 @@ class ConnectionBytestream: # if we want to respect jep-0065 we have to check for proxy # activation result in any result iq real_id = unicode(iq_obj.getAttr('id')) - if real_id[:3] != 'au_': + if not real_id.startswith('au_'): return frm = unicode(iq_obj.getFrom()) id = real_id[3:]