comparison twisted/plugins/pubsub.py @ 453:1a179ad10125

backend: service name can now be specified with `service_name` parameter
author Goffi <goffi@goffi.org>
date Fri, 02 Jul 2021 15:39:57 +0200
parents cc29a62fb64c
children bc2e04a4d3c1
comparison
equal deleted inserted replaced
452:8da3db1e82a9 453:1a179ad10125
59 from twisted.application import service 59 from twisted.application import service
60 from twisted.python import usage, log 60 from twisted.python import usage, log
61 from twisted.plugin import IPlugin 61 from twisted.plugin import IPlugin
62 from twisted.words.protocols.jabber.jid import JID 62 from twisted.words.protocols.jabber.jid import JID
63 import sat_pubsub 63 import sat_pubsub
64 from sat_pubsub import const
64 65
65 66
66 67
67 68
68 def coerceListType(value): 69 def coerceListType(value):
88 ['db_user', None, None, 'Database user (pgsql backend)'], 89 ['db_user', None, None, 'Database user (pgsql backend)'],
89 ['db_name', None, 'pubsub', 'Database name (pgsql backend)'], 90 ['db_name', None, 'pubsub', 'Database name (pgsql backend)'],
90 ['db_pass', None, None, 'Database password (pgsql backend)'], 91 ['db_pass', None, None, 'Database password (pgsql backend)'],
91 ['db_host', None, None, 'Database host (pgsql backend)'], 92 ['db_host', None, None, 'Database host (pgsql backend)'],
92 ['db_port', None, None, 'Database port (pgsql backend)'], 93 ['db_port', None, None, 'Database port (pgsql backend)'],
94 ['service_name', None, const.SERVICE_NAME, 'Name of this Pubsub service'],
93 ] 95 ]
94 96
95 OPT_PARAMETERS_CFG = [ 97 OPT_PARAMETERS_CFG = [
96 ["admins_jids_list", None, [], "List of administrators' bare jids", 98 ["admins_jids_list", None, [], "List of administrators' bare jids",
97 coerceJidListType] 99 coerceJidListType]
214 from wokkel.iwokkel import IPubSubResource 216 from wokkel.iwokkel import IPubSubResource
215 from wokkel import data_form 217 from wokkel import data_form
216 from wokkel import pubsub 218 from wokkel import pubsub
217 from wokkel import rsm 219 from wokkel import rsm
218 from wokkel import mam 220 from wokkel import mam
219 from sat_pubsub import const
220 from sat_pubsub import mam as pubsub_mam 221 from sat_pubsub import mam as pubsub_mam
221 from sat_pubsub import pubsub_admin 222 from sat_pubsub import pubsub_admin
222 from sat_pubsub.backend import BackendService, ExtraDiscoHandler 223 from sat_pubsub.backend import BackendService, ExtraDiscoHandler
223 from sat_pubsub.privilege import PrivilegesHandler 224 from sat_pubsub.privilege import PrivilegesHandler
224 from sat_pubsub.delegation import DelegationsHandler 225 from sat_pubsub.delegation import DelegationsHandler