mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-03 02:34:50 -04:00
Allow application services to have an optional 'url'
If 'url' is not specified, they will not be pushed for events or queries. This is useful for bots who simply wish to reserve large chunks of user/alias namespace, and don't care about being pushed for events.
This commit is contained in:
parent
c7f665d700
commit
e82247f990
2 changed files with 17 additions and 0 deletions
|
@ -132,6 +132,12 @@ def _load_appservice(hostname, as_info, config_filename):
|
|||
for p in protocols:
|
||||
if not isinstance(p, str):
|
||||
raise KeyError("Bad value for 'protocols' item")
|
||||
|
||||
if as_info["url"] == "":
|
||||
logger.info(
|
||||
"(%s) Explicitly empty 'url' provided. This application service will not receive events or queries.",
|
||||
config_filename,
|
||||
)
|
||||
return ApplicationService(
|
||||
token=as_info["as_token"],
|
||||
url=as_info["url"],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue