mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-07-25 18:15:20 -04:00
Add meow readme and config extension
This commit is contained in:
parent
932e104468
commit
543fcb6f17
4 changed files with 129 additions and 0 deletions
|
@ -35,6 +35,7 @@ from synapse.config import ( # noqa: F401
|
|||
jwt,
|
||||
key,
|
||||
logger,
|
||||
meow,
|
||||
metrics,
|
||||
modules,
|
||||
oembed,
|
||||
|
@ -90,6 +91,7 @@ class RootConfig:
|
|||
voip: voip.VoipConfig
|
||||
registration: registration.RegistrationConfig
|
||||
account_validity: account_validity.AccountValidityConfig
|
||||
meow: meow.MeowConfig
|
||||
metrics: metrics.MetricsConfig
|
||||
api: api.ApiConfig
|
||||
appservice: appservice.AppServiceConfig
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
from ._base import RootConfig
|
||||
from .meow import MeowConfig
|
||||
from .account_validity import AccountValidityConfig
|
||||
from .api import ApiConfig
|
||||
from .appservice import AppServiceConfig
|
||||
|
@ -57,6 +58,7 @@ from .workers import WorkerConfig
|
|||
|
||||
class HomeServerConfig(RootConfig):
|
||||
config_classes = [
|
||||
MeowConfig,
|
||||
ModulesConfig,
|
||||
ServerConfig,
|
||||
RetentionConfig,
|
||||
|
|
56
synapse/config/meow.py
Normal file
56
synapse/config/meow.py
Normal file
|
@ -0,0 +1,56 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Copyright 2020 Maunium
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
from ._base import Config
|
||||
|
||||
|
||||
class MeowConfig(Config):
|
||||
"""Meow Configuration
|
||||
Configuration for disabling dumb limits in Synapse
|
||||
"""
|
||||
|
||||
section = "meow"
|
||||
|
||||
def read_config(self, config, **kwargs):
|
||||
meow_config = config.get("meow", {})
|
||||
self.validation_override = set(meow_config.get("validation_override", []))
|
||||
self.filter_override = set(meow_config.get("filter_override", []))
|
||||
self.timestamp_override = set(meow_config.get("timestamp_override", []))
|
||||
self.admin_api_register_invalid = meow_config.get(
|
||||
"admin_api_register_invalid", True
|
||||
)
|
||||
self.appservice_batch_send_any = meow_config.get(
|
||||
"appservice_batch_send_any", False
|
||||
)
|
||||
|
||||
def generate_config_section(self, config_dir_path, server_name, **kwargs):
|
||||
return """
|
||||
# Configuration for disabling dumb limits in Synapse
|
||||
#
|
||||
#meow:
|
||||
# # List of users who aren't subject to unnecessary validation in the C-S API.
|
||||
# validation_override:
|
||||
# - "@you:example.com"
|
||||
# # List of users who will get org.matrix.dummy_event and m.room.aliases events down /sync
|
||||
# filter_override:
|
||||
# - "@you:example.com"
|
||||
# # List of users who can use timestamp massaging without being appservices
|
||||
# timestamp_override:
|
||||
# - "@you:example.com"
|
||||
# # Whether or not the admin API should be able to register invalid user IDs.
|
||||
# admin_api_register_invalid: true
|
||||
# # Whether appservices should be allowed to use MSC2716 batch sending as any local user.
|
||||
# appservice_batch_send_any: false
|
||||
"""
|
Loading…
Add table
Add a link
Reference in a new issue