diff 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
line wrap: on
line diff
--- a/twisted/plugins/pubsub.py	Fri Jul 02 15:18:09 2021 +0200
+++ b/twisted/plugins/pubsub.py	Fri Jul 02 15:39:57 2021 +0200
@@ -61,6 +61,7 @@
 from twisted.plugin import IPlugin
 from twisted.words.protocols.jabber.jid import JID
 import sat_pubsub
+from sat_pubsub import const
 
 
 
@@ -90,6 +91,7 @@
     ['db_pass', None, None, 'Database password (pgsql backend)'],
     ['db_host', None, None, 'Database host (pgsql backend)'],
     ['db_port', None, None, 'Database port (pgsql backend)'],
+    ['service_name', None, const.SERVICE_NAME, 'Name of this Pubsub service'],
     ]
 
 OPT_PARAMETERS_CFG = [
@@ -216,7 +218,6 @@
         from wokkel import pubsub
         from wokkel import rsm
         from wokkel import mam
-        from sat_pubsub import const
         from sat_pubsub import mam as pubsub_mam
         from sat_pubsub import pubsub_admin
         from sat_pubsub.backend import BackendService, ExtraDiscoHandler