plugin XEP-0060: fix extra passing when publishing an item.

This commit is contained in:
Goffi 2026-02-23 12:56:42 +01:00
commit 314b741cf6

View file

@ -779,6 +779,7 @@ class XEP_0060:
parsed_items,
options=publish_options,
sender=sender,
extra=extra,
)
except error.StanzaError as e:
if e.condition == "item-not-found":
@ -795,6 +796,7 @@ class XEP_0060:
parsed_items,
options=publish_options,
sender=sender,
extra=extra,
)
else:
raise e
@ -836,7 +838,7 @@ class XEP_0060:
)
)
iq_result = await self.publish(
client, service, nodeIdentifier, parsed_items
client, service, nodeIdentifier, parsed_items, extra=extra
)
else:
raise exceptions.InternalError(
@ -848,7 +850,7 @@ class XEP_0060:
try:
return [
item["id"]
for item in iq_result.pubsub.publish.elements(pubsub.NS_PUBSUB, "item")
for item in iq_result.pubsub.publish.elements(pubsub.NS_PUBSUB, "item", extra=extra)
]
except AttributeError:
return []