diff options
author | Nathan Fritz <nathan@andyet.net> | 2010-04-14 01:23:17 -0700 |
---|---|---|
committer | Nathan Fritz <nathan@andyet.net> | 2010-04-14 01:23:17 -0700 |
commit | 80e7e0d0ee45acf5641f630c0f858a91cbf1a222 (patch) | |
tree | c8dad5af2fcd57c24e7f0ebe2f9284a171a19c1f /sleekxmpp/plugins | |
parent | 2f9f649d98682817c900736c6775ba8e5b23060f (diff) | |
download | slixmpp-80e7e0d0ee45acf5641f630c0f858a91cbf1a222.tar.gz slixmpp-80e7e0d0ee45acf5641f630c0f858a91cbf1a222.tar.bz2 slixmpp-80e7e0d0ee45acf5641f630c0f858a91cbf1a222.tar.xz slixmpp-80e7e0d0ee45acf5641f630c0f858a91cbf1a222.zip |
adding tests, fixed stanzapath matching to match keys, fixed pubsub#owner stanzas
Diffstat (limited to 'sleekxmpp/plugins')
-rw-r--r-- | sleekxmpp/plugins/stanza_pubsub.py | 34 |
1 files changed, 1 insertions, 33 deletions
diff --git a/sleekxmpp/plugins/stanza_pubsub.py b/sleekxmpp/plugins/stanza_pubsub.py index 09cff88a..1d8c86f2 100644 --- a/sleekxmpp/plugins/stanza_pubsub.py +++ b/sleekxmpp/plugins/stanza_pubsub.py @@ -286,39 +286,6 @@ stanzaPlugin(Pubsub, Configure) stanzaPlugin(Create, Configure) class DefaultConfig(ElementBase): - namespace = 'http://jabber.org/protocol/pubsub' - name = 'default' - plugin_attrib = 'default' - interfaces = set(('node', 'type', 'config')) - plugin_attrib_map = {} - plugin_tag_map = {} - - def __init__(self, *args, **kwargs): - ElementBase.__init__(self, *args, **kwargs) - - def getConfig(self): - config = self.xml.find('{jabber:x:data}x') - form = xep_0004.Form() - if config is not None: - form.fromXML(config) - return form - - def setConfig(self, value): - self.xml.append(value.getXML()) - return self - - def delConfig(self): - config = self.xml.find('{jabber:x:data}x') - self.xml.remove(config) - - def getType(self): - t = self._getAttr('type') - if not t: t == 'leaf' - return t - -stanzaPlugin(Pubsub, DefaultConfig) - -class DefaultConfigOwner(ElementBase): namespace = 'http://jabber.org/protocol/pubsub#owner' name = 'default' plugin_attrib = 'default' @@ -440,6 +407,7 @@ class OwnerDelete(ElementBase, OptionalSetting): plugin_attrib = 'delete' plugin_attrib_map = {} plugin_tag_map = {} + interfaces = set(('node',)) stanzaPlugin(PubsubOwner, OwnerDelete) |