Mercurial > libervia-backend
diff sat/plugins/plugin_xep_0060.py @ 3854:8a2c46122a11
plugin XEP-0060: fix bad naming of return variable
author | Goffi <goffi@goffi.org> |
---|---|
date | Thu, 14 Jul 2022 12:55:30 +0200 |
parents | bc24ce903835 |
children | 3ef988734869 |
line wrap: on
line diff
--- a/sat/plugins/plugin_xep_0060.py Thu Jul 14 12:55:30 2022 +0200 +++ b/sat/plugins/plugin_xep_0060.py Thu Jul 14 12:55:30 2022 +0200 @@ -633,8 +633,10 @@ else: raise e try: - return [item['id'] - for item in iq_result.pubsub.publish.elements(pubsub.NS_PUBSUB, 'item')] + return [ + item['id'] + for item in iq_result.pubsub.publish.elements(pubsub.NS_PUBSUB, 'item') + ] except AttributeError: return [] @@ -645,17 +647,21 @@ nodeIdentifier: str, items: Optional[List[domish.Element]] = None, options: Optional[dict] = None - ) -> List[str]: - published_ids = await client.pubsub_client.publish( + ) -> domish.Element: + """Publish pubsub items + + @return: IQ result stanza + """ + iq_result_elt = await client.pubsub_client.publish( service, nodeIdentifier, items, client.pubsub_client.parent.jid, options=options ) await self.host.trigger.asyncPoint( "XEP-0060_publish", client, service, nodeIdentifier, items, options, - published_ids + iq_result_elt ) - return published_ids + return iq_result_elt def _unwrapMAMMessage(self, message_elt): try: