diff options
author | fritzy <fritzy@ip-10-251-242-239.ec2.internal> | 2010-08-21 22:48:43 +0000 |
---|---|---|
committer | fritzy <fritzy@ip-10-251-242-239.ec2.internal> | 2010-08-21 22:48:43 +0000 |
commit | 345656926ea5ee8e8cc359b97fd1d0cbc4b1fab4 (patch) | |
tree | ca0c851734641f6c4a0169528eee19bd706191be /sleekxmpp/plugins/stanza_pubsub.py | |
parent | c05ddcb7f5eaa5bbf7efb4e765d04b62212a3394 (diff) | |
download | slixmpp-345656926ea5ee8e8cc359b97fd1d0cbc4b1fab4.tar.gz slixmpp-345656926ea5ee8e8cc359b97fd1d0cbc4b1fab4.tar.bz2 slixmpp-345656926ea5ee8e8cc359b97fd1d0cbc4b1fab4.tar.xz slixmpp-345656926ea5ee8e8cc359b97fd1d0cbc4b1fab4.zip |
added form compatibility with old api, stanzas now bool() to True on 2.x, jid attributes will return '' if not set
Diffstat (limited to 'sleekxmpp/plugins/stanza_pubsub.py')
-rw-r--r-- | sleekxmpp/plugins/stanza_pubsub.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/sleekxmpp/plugins/stanza_pubsub.py b/sleekxmpp/plugins/stanza_pubsub.py index 96d02f93..01aac095 100644 --- a/sleekxmpp/plugins/stanza_pubsub.py +++ b/sleekxmpp/plugins/stanza_pubsub.py @@ -284,6 +284,14 @@ class DefaultConfig(ElementBase): t = self._getAttr('type') if not t: t = 'leaf' return t + + def getConfig(self): + return self['form'] + + def setConfig(self, value): + self['form'].setStanzaValues(value.getStanzaValues()) + print self['form']['title'] + return self registerStanzaPlugin(PubsubOwner, DefaultConfig) registerStanzaPlugin(DefaultConfig, xep_0004.Form) @@ -356,8 +364,17 @@ class OwnerDefault(OwnerConfigure): interfaces = set(('node', 'config')) plugin_attrib_map = {} plugin_tag_map = {} + + def getConfig(self): + return self['form'] + + def setConfig(self, value): + self['form'].setStanzaValues(value.getStanzaValues()) + print self['from']['title'] + return self registerStanzaPlugin(PubsubOwner, OwnerDefault) +registerStanzaPlugin(OwnerDefault, xep_0004.Form) class OwnerDelete(ElementBase, OptionalSetting): namespace = 'http://jabber.org/protocol/pubsub#owner' |