comparison sat/core/xmpp.py @ 2983:97a1faca8f58

core (xmpp): fixed URI correction while parsing messages: A double "==" was used instead of a single one. As a result URI was never fixed and some elements could be missed (like body), and then the message discarded. Should fix 294 (to be confirmed). fix 294
author Goffi <goffi@goffi.org>
date Tue, 02 Jul 2019 09:09:04 +0200
parents f44a95f566d2
children 4bac4e734666
comparison
equal deleted inserted replaced
2982:95c774627a95 2983:97a1faca8f58
969 if message_elt.uri is None: 969 if message_elt.uri is None:
970 # wokkel element parsing strip out root namespace 970 # wokkel element parsing strip out root namespace
971 message_elt.defaultUri = message_elt.uri = C.NS_CLIENT 971 message_elt.defaultUri = message_elt.uri = C.NS_CLIENT
972 for c in message_elt.elements(): 972 for c in message_elt.elements():
973 if c.uri is None: 973 if c.uri is None:
974 c.uri == C.NS_CLIENT 974 c.uri = C.NS_CLIENT
975 elif message_elt.uri != C.NS_CLIENT: 975 elif message_elt.uri != C.NS_CLIENT:
976 log.warning(_( 976 log.warning(_(
977 u"received <message> with a wrong namespace: {xml}" 977 u"received <message> with a wrong namespace: {xml}"
978 .format(xml=message_elt.toXml()))) 978 .format(xml=message_elt.toXml())))
979 979