Mercurial > libervia-pubsub
comparison sat_pubsub/pubsub_admin.py @ 478:b544109ab4c4
Privileged Entity update + Pubsub Account Management partial implementation + Public Pubsub Subscription
/!\ pgsql schema needs to be updated /!\
/!\ server conf needs to be updated for privileged entity: only the new
`urn:xmpp:privilege:2` namespace is handled now /!\
Privileged entity has been updated to hanlde the new namespace and IQ permission. Roster
pushes are not managed yet.
XEP-0376 (Pubsub Account Management) is partially implemented. The XEP is not fully
specified at the moment, and my messages on standard@ haven't seen any reply. Thus for now
only "Subscribing", "Unsubscribing" and "Listing Subscriptions" is implemented, "Auto
Subscriptions" and "Filtering" is not.
Public Pubsub Subscription
(https://xmpp.org/extensions/inbox/pubsub-public-subscriptions.html) is implemented;
the XEP has been accepted by council but is not yet published. It will be updated to use
subscription options instead of the <public> element actually specified, I'm waiting
for publication to update the XEP.
unsubscribe has been updated to return the `<subscription>` element as expected by
XEP-0060 (sat_tmp needs to be updated).
database schema has been updated to add columns necessary to keep track of subscriptions
to external nodes and to mark subscriptions as public.
author | Goffi <goffi@goffi.org> |
---|---|
date | Wed, 11 May 2022 13:39:08 +0200 |
parents | 412d26a9b2c2 |
children |
comparison
equal
deleted
inserted
replaced
477:9125a6e440c0 | 478:b544109ab4c4 |
---|---|
90 | 90 |
91 # now we can send the items | 91 # now we can send the items |
92 for item in publish_elt.elements(pubsub.NS_PUBSUB, 'item'): | 92 for item in publish_elt.elements(pubsub.NS_PUBSUB, 'item'): |
93 try: | 93 try: |
94 requestor = jid.JID(item.attributes.pop('publisher')) | 94 requestor = jid.JID(item.attributes.pop('publisher')) |
95 except KeyError: | |
96 requestor = from_jid | |
95 except Exception as e: | 97 except Exception as e: |
96 log.msg("WARNING: invalid jid in publisher ({requestor}): {msg}" | 98 log.msg("WARNING: invalid jid in publisher ({requestor}): {msg}" |
97 .format(requestor=requestor, msg=e)) | 99 .format(requestor=requestor, msg=e)) |
98 self.sendError(iq_elt) | 100 self.sendError(iq_elt) |
99 return | 101 return |
100 except KeyError: | |
101 requestor = from_jid | |
102 | 102 |
103 # we don't use a DeferredList because we want to be sure that | 103 # we don't use a DeferredList because we want to be sure that |
104 # each request is done in order | 104 # each request is done in order |
105 try: | 105 try: |
106 payload = yield self.backend.publish( | 106 payload = yield self.backend.publish( |