summaryrefslogtreecommitdiff
path: root/sleekxmpp/plugins/xep_0004.py
diff options
context:
space:
mode:
authorfritzy <fritzy@ip-10-251-242-239.ec2.internal>2010-08-31 14:44:24 +0000
committerfritzy <fritzy@ip-10-251-242-239.ec2.internal>2010-08-31 14:44:24 +0000
commit6dfea828be54d9048779d06b4b31be98b58a2343 (patch)
tree5f605ff7b61c83140d9e0bc8fd1e7ccb8b0a82e5 /sleekxmpp/plugins/xep_0004.py
parent00d7952001ce82e4c89699970dee38f29f4c7419 (diff)
downloadslixmpp-6dfea828be54d9048779d06b4b31be98b58a2343.tar.gz
slixmpp-6dfea828be54d9048779d06b4b31be98b58a2343.tar.bz2
slixmpp-6dfea828be54d9048779d06b4b31be98b58a2343.tar.xz
slixmpp-6dfea828be54d9048779d06b4b31be98b58a2343.zip
xep-0004 merge should deal with dictionaries
Diffstat (limited to 'sleekxmpp/plugins/xep_0004.py')
-rw-r--r--sleekxmpp/plugins/xep_0004.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/sleekxmpp/plugins/xep_0004.py b/sleekxmpp/plugins/xep_0004.py
index 9e67e656..a4cb8e9f 100644
--- a/sleekxmpp/plugins/xep_0004.py
+++ b/sleekxmpp/plugins/xep_0004.py
@@ -13,6 +13,7 @@ from .. xmlstream.handler.callback import Callback
from .. xmlstream.matcher.xpath import MatchXPath
from .. xmlstream.stanzabase import registerStanzaPlugin, ElementBase, ET, JID
from .. stanza.message import Message
+import types
class Form(ElementBase):
@@ -199,6 +200,9 @@ class Form(ElementBase):
def merge(self, other):
new = copy.copy(self)
+ if type(other) == types.DictType:
+ new.setValues(other)
+ return new
nfields = new.getFields(use_dict=True)
ofields = other.getFields(use_dict=True)
nfields.update(ofields)