# HG changeset patch # User Goffi # Date 1490540273 -7200 # Node ID e3e02ead6bdeb2c03393770debb41c6bd1aab2a2 # Parent e8296d7bfeb19d078e3b8e97b3488f3460688e2b tmp(wokkel/pubsub): removed affiliations attribute which was there twice + added missing _render_affiliations diff -r e8296d7bfeb1 -r e3e02ead6bde wokkel/pubsub.py --- a/wokkel/pubsub.py Thu Mar 23 20:59:25 2017 +0100 +++ b/wokkel/pubsub.py Sun Mar 26 16:57:53 2017 +0200 @@ -287,7 +287,6 @@ verb = None - affiliations = None items = None itemIdentifiers = None maxItems = None @@ -615,6 +614,11 @@ 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')