Mercurial > libervia-pubsub
view sat_pubsub.tac @ 343:ff8aff4c9b79
backend, psql: implemented notifications for auto subscribers in PEP:
people with presence permission from node owner and who request notification (+notify) from node will receive notifications according to XEP-0163 §4.
This make SàT Pubsub a nearly fully compliant PEP service. Following features are still missing:
- presence access model, should be implemented very soon as everything is already there
- deleting resource on unavailable presence, will be implemented really soon
- XEP-0115 hash check
- and most importantly, rosters updates. XEP-0356 needs to be updated for this.
author | Goffi <goffi@goffi.org> |
---|---|
date | Sun, 20 Aug 2017 18:41:21 +0200 |
parents | 51af2ed8bd50 |
children |
line wrap: on
line source
#!/usr/bin/python #-*- coding: utf-8 -*- # Copyright (c) 2003-2008 Ralph Meijer # See LICENSE for details. """ Example TAC for SàT Pubsub. """ from twisted.application import service from twisted.words.protocols.jabber.jid import JID from sat_pubsub import tap application = service.Application("sat_pubsub") config = { 'jid': JID('sat-pubsub.necton3.int'), 'secret': 'pass', 'rhost': '127.0.0.1', 'rport': 5347, 'backend': 'pgsql', 'dbuser': 'goffi', 'dbpass': 'toto', 'dbname': "pubsub", 'dbhost': "localhost", 'dbport': None, 'verbose': True, 'hide-nodes': False, } idavollService = tap.makeService(config) idavollService.setServiceParent(application) # Set the maximum delay until trying to reconnect. componentService = idavollService.getServiceNamed('component') componentService.factory.maxdelay = 300