summaryrefslogtreecommitdiff
path: root/sleekxmpp/plugins/xep_0060/pubsub.py
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/pubsub.py
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/pubsub.py')
-rw-r--r--sleekxmpp/plugins/xep_0060/pubsub.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/sleekxmpp/plugins/xep_0060/pubsub.py b/sleekxmpp/plugins/xep_0060/pubsub.py
index a5db137e..5a9fe70c 100644
--- a/sleekxmpp/plugins/xep_0060/pubsub.py
+++ b/sleekxmpp/plugins/xep_0060/pubsub.py
@@ -400,8 +400,8 @@ class xep_0060(base_plugin):
affiliations = []
for jid, affiliation in affiliations:
- aff = stanza.pubsub.Affiliation()
- aff['jid'] = user_jid
+ aff = self.stanza.OwnerAffiliation()
+ aff['jid'] = jid
aff['affiliation'] = affiliation
iq['pubsub_owner']['affiliations'].append(aff)
@@ -416,8 +416,8 @@ class xep_0060(base_plugin):
subscriptions = []
for jid, subscription in subscriptions:
- sub = self.stanza.Subscription()
- sub['jid'] = user_jid
+ sub = self.stanza.OwnerSubscription()
+ sub['jid'] = jid
sub['subscription'] = subscription
iq['pubsub_owner']['subscriptions'].append(sub)