From b211d3afe60ef9a3dca0978ece874556d2bc3b4a Mon Sep 17 00:00:00 2001 From: Goffi Date: Sun, 26 Mar 2017 16:57:53 +0200 Subject: [PATCH] tmp(wokkel/pubsub): removed affiliations attribute which was there twice + added missing _render_affiliations --- src/tmp/wokkel/pubsub.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/tmp/wokkel/pubsub.py b/src/tmp/wokkel/pubsub.py index 22345123..94ee0388 100755 --- a/src/tmp/wokkel/pubsub.py +++ b/src/tmp/wokkel/pubsub.py @@ -287,7 +287,6 @@ class PubSubRequest(generic.Stanza): verb = None - affiliations = None items = None itemIdentifiers = None maxItems = None @@ -615,6 +614,11 @@ class PubSubRequest(generic.Stanza): self.affiliations[entity] = affiliation + def _render_affiliations(self, verbElement): + for entity, affiliation in self.affiliations.iteritems(): + affiliationElement = verbElement.addElement((NS_PUBSUB_OWNER, 'affiliation')) + affiliationElement['jid'] = entity.full() + affiliationElement['affiliation'] = affiliation def _parse_notify(self, verbElement): value = verbElement.getAttribute('notify')