Mercurial > libervia-pubsub
comparison twisted/plugins/pubsub.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 | 607616f9ef5b |
children |
comparison
equal
deleted
inserted
replaced
477:9125a6e440c0 | 478:b544109ab4c4 |
---|---|
230 from sat_pubsub import mam as pubsub_mam | 230 from sat_pubsub import mam as pubsub_mam |
231 from sat_pubsub import pubsub_admin | 231 from sat_pubsub import pubsub_admin |
232 from sat_pubsub.backend import BackendService, ExtraDiscoHandler | 232 from sat_pubsub.backend import BackendService, ExtraDiscoHandler |
233 from sat_pubsub.privilege import PrivilegesHandler | 233 from sat_pubsub.privilege import PrivilegesHandler |
234 from sat_pubsub.delegation import DelegationsHandler | 234 from sat_pubsub.delegation import DelegationsHandler |
235 from sat_pubsub.pam import PAMHandler | |
235 | 236 |
236 if not config['jid'] or not config['xmpp_pwd']: | 237 if not config['jid'] or not config['xmpp_pwd']: |
237 raise usage.UsageError("You must specify jid and xmpp_pwd") | 238 raise usage.UsageError("You must specify jid and xmpp_pwd") |
238 s = service.MultiService() | 239 s = service.MultiService() |
239 | 240 |
288 | 289 |
289 ph = PrivilegesHandler(config['jid']) | 290 ph = PrivilegesHandler(config['jid']) |
290 ph.setHandlerParent(cs) | 291 ph.setHandlerParent(cs) |
291 bs.privilege = ph | 292 bs.privilege = ph |
292 | 293 |
294 pam = PAMHandler(config["jid"]) | |
295 pam.setHandlerParent(cs) | |
296 bs.pam = pam | |
297 | |
293 resource = IPubSubResource(bs) | 298 resource = IPubSubResource(bs) |
294 resource.hideNodes = config["hide-nodes"] | 299 resource.hideNodes = config["hide-nodes"] |
295 resource.serviceJID = config["jid"] | 300 resource.serviceJID = config["jid"] |
296 | 301 |
297 ps = (rsm if const.FLAG_ENABLE_RSM else pubsub).PubSubService(resource) | 302 ps = (rsm if const.FLAG_ENABLE_RSM else pubsub).PubSubService(resource) |