summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--slixmpp/plugins/xep_0060/stanza/pubsub.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/slixmpp/plugins/xep_0060/stanza/pubsub.py b/slixmpp/plugins/xep_0060/stanza/pubsub.py
index 5e060150..3f6f2719 100644
--- a/slixmpp/plugins/xep_0060/stanza/pubsub.py
+++ b/slixmpp/plugins/xep_0060/stanza/pubsub.py
@@ -206,7 +206,10 @@ class Options(ElementBase):
return form
def set_options(self, value):
- self.xml.append(value)
+ if isinstance(value, ElementBase):
+ self.xml.append(value.xml)
+ else:
+ self.xml.append(value)
return self
def del_options(self):
@@ -238,7 +241,10 @@ class PublishOptions(ElementBase):
if value is None:
self.del_publish_options()
else:
- self.xml.append(value)
+ if isinstance(value, ElementBase):
+ self.xml.append(value.xml)
+ else:
+ self.xml.append(value)
return self
def del_publish_options(self):