mirror of
https://mau.dev/maunium/synapse.git
synced 2024-08-27 12:42:39 +00:00
![devonh](/assets/img/avatar_default.png)
This PR ports the logic from the [synapse_auto_accept_invite](https://github.com/matrix-org/synapse-auto-accept-invite) module into synapse. I went with the naive approach of injecting the "module" next to where third party modules are currently loaded. If there is a better/preferred way to handle this, I'm all ears. It wasn't obvious to me if there was a better location to add this logic that would cleanly apply to all incoming invite events. Relies on https://github.com/element-hq/synapse/pull/17166 to fix linter errors.
111 lines
3.3 KiB
Python
111 lines
3.3 KiB
Python
#
|
|
# This file is licensed under the Affero General Public License (AGPL) version 3.
|
|
#
|
|
# Copyright 2021 The Matrix.org Foundation C.I.C.
|
|
# Copyright (C) 2023 New Vector, Ltd
|
|
#
|
|
# This program is free software: you can redistribute it and/or modify
|
|
# it under the terms of the GNU Affero General Public License as
|
|
# published by the Free Software Foundation, either version 3 of the
|
|
# License, or (at your option) any later version.
|
|
#
|
|
# See the GNU Affero General Public License for more details:
|
|
# <https://www.gnu.org/licenses/agpl-3.0.html>.
|
|
#
|
|
# Originally licensed under the Apache License, Version 2.0:
|
|
# <http://www.apache.org/licenses/LICENSE-2.0>.
|
|
#
|
|
# [This file includes modifications made by New Vector Limited]
|
|
#
|
|
#
|
|
from ._base import RootConfig
|
|
from .account_validity import AccountValidityConfig
|
|
from .api import ApiConfig
|
|
from .appservice import AppServiceConfig
|
|
from .auth import AuthConfig
|
|
from .auto_accept_invites import AutoAcceptInvitesConfig
|
|
from .background_updates import BackgroundUpdateConfig
|
|
from .cache import CacheConfig
|
|
from .captcha import CaptchaConfig
|
|
from .cas import CasConfig
|
|
from .consent import ConsentConfig
|
|
from .database import DatabaseConfig
|
|
from .emailconfig import EmailConfig
|
|
from .experimental import ExperimentalConfig
|
|
from .federation import FederationConfig
|
|
from .jwt import JWTConfig
|
|
from .key import KeyConfig
|
|
from .logger import LoggingConfig
|
|
from .metrics import MetricsConfig
|
|
from .modules import ModulesConfig
|
|
from .oembed import OembedConfig
|
|
from .oidc import OIDCConfig
|
|
from .password_auth_providers import PasswordAuthProviderConfig
|
|
from .push import PushConfig
|
|
from .ratelimiting import RatelimitConfig
|
|
from .redis import RedisConfig
|
|
from .registration import RegistrationConfig
|
|
from .repository import ContentRepositoryConfig
|
|
from .retention import RetentionConfig
|
|
from .room import RoomConfig
|
|
from .room_directory import RoomDirectoryConfig
|
|
from .saml2 import SAML2Config
|
|
from .server import ServerConfig
|
|
from .server_notices import ServerNoticesConfig
|
|
from .spam_checker import SpamCheckerConfig
|
|
from .sso import SSOConfig
|
|
from .stats import StatsConfig
|
|
from .third_party_event_rules import ThirdPartyRulesConfig
|
|
from .tls import TlsConfig
|
|
from .tracer import TracerConfig
|
|
from .user_directory import UserDirectoryConfig
|
|
from .voip import VoipConfig
|
|
from .workers import WorkerConfig
|
|
|
|
|
|
class HomeServerConfig(RootConfig):
|
|
config_classes = [
|
|
ModulesConfig,
|
|
ServerConfig,
|
|
RetentionConfig,
|
|
TlsConfig,
|
|
FederationConfig,
|
|
CacheConfig,
|
|
DatabaseConfig,
|
|
LoggingConfig,
|
|
RatelimitConfig,
|
|
ContentRepositoryConfig,
|
|
OembedConfig,
|
|
CaptchaConfig,
|
|
VoipConfig,
|
|
RegistrationConfig,
|
|
AccountValidityConfig,
|
|
MetricsConfig,
|
|
ApiConfig,
|
|
AppServiceConfig,
|
|
KeyConfig,
|
|
SAML2Config,
|
|
OIDCConfig,
|
|
CasConfig,
|
|
SSOConfig,
|
|
JWTConfig,
|
|
AuthConfig,
|
|
EmailConfig,
|
|
PasswordAuthProviderConfig,
|
|
PushConfig,
|
|
SpamCheckerConfig,
|
|
RoomConfig,
|
|
UserDirectoryConfig,
|
|
ConsentConfig,
|
|
StatsConfig,
|
|
ServerNoticesConfig,
|
|
RoomDirectoryConfig,
|
|
ThirdPartyRulesConfig,
|
|
TracerConfig,
|
|
WorkerConfig,
|
|
RedisConfig,
|
|
ExperimentalConfig,
|
|
BackgroundUpdateConfig,
|
|
AutoAcceptInvitesConfig,
|
|
]
|