plugin pubsub signing: pubsub items signature implementation:

- this is based on a protoXEP, not yet an official XEP: https://github.com/xsf/xeps/pull/1228
- XEP-0470: `set` attachment handler can now be async

rel 381
This commit is contained in:
Goffi 2022-10-28 18:47:17 +02:00
commit 4f13a79f87

View file

@ -81,7 +81,7 @@ class Events:
self._a = host.plugins["XEP-0470"]
# self._i = host.plugins.get("EMAIL_INVITATION")
host.registerNamespace("events", NS_EVENTS)
self._a.registerAttachmentHandler("rsvp", NS_EVENTS, self.rsvp_get, self.rsvp_set)
self._a.register_attachment_handler("rsvp", NS_EVENTS, self.rsvp_get, self.rsvp_set)
# host.plugins["PUBSUB_INVITATION"].register(NS_EVENTS, self)
host.bridge.addMethod(
"eventsGet",
@ -982,7 +982,7 @@ class Events:
service = client.jid.userhostJID()
if node is None:
node = NS_EVENTS
await self._a.setAttachments(client, {
await self._a.set_attachements(client, {
"service": service.full(),
"node": node,
"id": item,