summaryrefslogtreecommitdiff
path: root/sleekxmpp/plugins/xep_0060/stanza
diff options
context:
space:
mode:
authorLance Stout <lancestout@gmail.com>2011-09-01 12:08:35 -0700
committerLance Stout <lancestout@gmail.com>2011-09-01 12:09:24 -0700
commit462b375c8f9ff22cdd4fe282dd90b0a5154a938c (patch)
treef170742bb85d419f9793cd17c13d4883ea700d17 /sleekxmpp/plugins/xep_0060/stanza
parentafbd506cfc5aea6e70edc5cb6584e9d36f539965 (diff)
downloadslixmpp-462b375c8f9ff22cdd4fe282dd90b0a5154a938c.tar.gz
slixmpp-462b375c8f9ff22cdd4fe282dd90b0a5154a938c.tar.bz2
slixmpp-462b375c8f9ff22cdd4fe282dd90b0a5154a938c.tar.xz
slixmpp-462b375c8f9ff22cdd4fe282dd90b0a5154a938c.zip
Owners can modify subscriptions/affiliations. With tests.
94% coverage for the main pubsub plugin! (91% including stanzas)
Diffstat (limited to 'sleekxmpp/plugins/xep_0060/stanza')
-rw-r--r--sleekxmpp/plugins/xep_0060/stanza/pubsub_owner.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/sleekxmpp/plugins/xep_0060/stanza/pubsub_owner.py b/sleekxmpp/plugins/xep_0060/stanza/pubsub_owner.py
index fd8ec1f2..1fdfb738 100644
--- a/sleekxmpp/plugins/xep_0060/stanza/pubsub_owner.py
+++ b/sleekxmpp/plugins/xep_0060/stanza/pubsub_owner.py
@@ -41,7 +41,7 @@ registerStanzaPlugin(DefaultConfig, xep_0004.Form)
class OwnerAffiliations(Affiliations):
namespace = 'http://jabber.org/protocol/pubsub#owner'
- interfaces = set(('node'))
+ interfaces = set(('node',))
plugin_attrib_map = {}
plugin_tag_map = {}
@@ -49,7 +49,6 @@ class OwnerAffiliations(Affiliations):
if not isinstance(affiliation, OwnerAffiliation):
raise TypeError
self.xml.append(affiliation.xml)
- return self.affiliations.append(affiliation)
registerStanzaPlugin(PubsubOwner, OwnerAffiliations)
@@ -59,6 +58,8 @@ class OwnerAffiliation(Affiliation):
plugin_attrib_map = {}
plugin_tag_map = {}
+registerStanzaPlugin(OwnerAffiliations, OwnerAffiliation, iterable=True)
+
class OwnerConfigure(Configure):
name = 'configure'
plugin_attrib = 'configure'
@@ -126,7 +127,6 @@ class OwnerSubscriptions(Subscriptions):
if not isinstance(subscription, OwnerSubscription):
raise TypeError
self.xml.append(subscription.xml)
- return self.subscriptions.append(subscription)
registerStanzaPlugin(PubsubOwner, OwnerSubscriptions)
@@ -142,4 +142,6 @@ class OwnerSubscription(ElementBase):
self._setAttr('jid', str(value))
def getJid(self):
- return JID(self._getAttr('from'))
+ return JID(self._getAttr('jid'))
+
+registerStanzaPlugin(OwnerSubscriptions, OwnerSubscription, iterable=True)