# HG changeset patch # User Goffi # Date 1490540273 -7200 # Node ID 582359de7268613068c8ef29adf97d1e7f7fd4e6 # Parent afc703419186d31acb4024d474f920702775fe19 tmp(wokkel/pubsub): removed affiliations attribute which was there twice + added missing _render_affiliations diff -r afc703419186 -r 582359de7268 src/tmp/wokkel/pubsub.py --- a/src/tmp/wokkel/pubsub.py Thu Mar 23 21:04:01 2017 +0100 +++ b/src/tmp/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')