core, plugin XEP-0045: fix crashes when changing URIs:
When adding missing URIs in message, the "children" property was used instead of elements(). "children" not only return elements, and this was causing crashes. This may fix bug 294 rel 294
This commit is contained in:
parent
1250f1a8ac
commit
c226b72b20
2 changed files with 2 additions and 2 deletions
|
|
@ -969,7 +969,7 @@ class SatMessageProtocol(xmppim.MessageProtocol):
|
|||
if message_elt.uri is None:
|
||||
# wokkel element parsing strip out root namespace
|
||||
message_elt.defaultUri = message_elt.uri = C.NS_CLIENT
|
||||
for c in message_elt.children:
|
||||
for c in message_elt.elements():
|
||||
if c.uri is None:
|
||||
c.uri == C.NS_CLIENT
|
||||
elif message_elt.uri != C.NS_CLIENT:
|
||||
|
|
|
|||
|
|
@ -1192,7 +1192,7 @@ class SatMUCClient(muc.MUCClient):
|
|||
# unexpected <delay> elements which break our workflow.
|
||||
log.warning(_(u"storing the unexpected message anyway, to avoid loss"))
|
||||
# we have to restore URI which are stripped by wokkel parsing
|
||||
for c in message.element.children:
|
||||
for c in message.element.elements():
|
||||
if c.uri is None:
|
||||
c.uri = C.NS_CLIENT
|
||||
mess_data = self.client.messageProt.parseMessage(message.element)
|
||||
|
|
|
|||
Loading…
Reference in a new issue