Fix the uses of stanza.reply()
This is relying on the stanzas being copied for each handler. We no longer do that for performance reasons, so instead of editing the copy in-place, stanza.reply() now returns a new stanza.
This commit is contained in:
@@ -634,7 +634,7 @@ class XEP_0030(BasePlugin):
|
||||
info['id'] = iq['id']
|
||||
info.send()
|
||||
else:
|
||||
iq.reply()
|
||||
iq = iq.reply()
|
||||
if info:
|
||||
info = self._fix_default_info(info)
|
||||
iq.set_payload(info.xml)
|
||||
@@ -674,7 +674,7 @@ class XEP_0030(BasePlugin):
|
||||
if isinstance(items, Iq):
|
||||
items.send()
|
||||
else:
|
||||
iq.reply()
|
||||
iq = iq.reply()
|
||||
if items:
|
||||
iq.set_payload(items.xml)
|
||||
iq.send()
|
||||
|
||||
Reference in New Issue
Block a user