diff sat/plugins/plugin_xep_0045.py @ 2815:27d9d25ec3cd

plugin XEP-0045: fixed issue with deepcopy by using new xml_tools.elementCopy method
author Goffi <goffi@goffi.org>
date Thu, 28 Feb 2019 18:57:04 +0100
parents 33fa70c102de
children 5284be4c601b
line wrap: on
line diff
--- a/sat/plugins/plugin_xep_0045.py	Thu Feb 28 18:57:00 2019 +0100
+++ b/sat/plugins/plugin_xep_0045.py	Thu Feb 28 18:57:04 2019 +0100
@@ -30,7 +30,6 @@
 
 import time
 import uuid
-import copy
 
 from wokkel import muc, disco, iwokkel
 from sat.tools import xml_tools
@@ -761,7 +760,7 @@
         # 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