plugin XEP-0045: fixed issue with deepcopy by using new xml_tools.elementCopy method

This commit is contained in:
Goffi 2019-02-28 18:57:04 +01:00
commit 409118f255

View file

@ -30,7 +30,6 @@ from sat.memory import memory
import time
import uuid
import copy
from wokkel import muc, disco, iwokkel
from sat.tools import xml_tools
@ -761,7 +760,7 @@ class XEP_0045(object):
# XXX: shouldn't it be done by the server ?!!
muc_client = client._muc_client
for room_jid, room in muc_client.joined_rooms.iteritems():
elt = copy.deepcopy(presence_elt)
elt = xml_tools.elementCopy(presence_elt)
elt['to'] = room_jid.userhost() + '/' + room.nick
client.presence.send(elt)
return True