fix: remove duplicate import, tidy MatrixConfig comments
This commit is contained in:
@@ -6,7 +6,6 @@ from typing import Literal
|
|||||||
from pydantic import BaseModel, Field, ConfigDict
|
from pydantic import BaseModel, Field, ConfigDict
|
||||||
from pydantic.alias_generators import to_camel
|
from pydantic.alias_generators import to_camel
|
||||||
from pydantic_settings import BaseSettings
|
from pydantic_settings import BaseSettings
|
||||||
from typing import Literal
|
|
||||||
|
|
||||||
|
|
||||||
class Base(BaseModel):
|
class Base(BaseModel):
|
||||||
@@ -187,18 +186,14 @@ class QQConfig(Base):
|
|||||||
|
|
||||||
class MatrixConfig(Base):
|
class MatrixConfig(Base):
|
||||||
"""Matrix (Element) channel configuration."""
|
"""Matrix (Element) channel configuration."""
|
||||||
|
|
||||||
enabled: bool = False
|
enabled: bool = False
|
||||||
homeserver: str = "https://matrix.org"
|
homeserver: str = "https://matrix.org"
|
||||||
access_token: str = ""
|
access_token: str = ""
|
||||||
user_id: str = "" # @bot:matrix.org
|
user_id: str = "" # e.g. @bot:matrix.org
|
||||||
device_id: str = ""
|
device_id: str = ""
|
||||||
# Enable Matrix E2EE support (encryption + encrypted room handling).
|
e2ee_enabled: bool = True # end-to-end encryption support
|
||||||
e2ee_enabled: bool = True
|
sync_stop_grace_seconds: int = 2 # graceful sync_forever shutdown timeout
|
||||||
# Max seconds to wait for sync_forever to stop gracefully before cancellation fallback.
|
max_media_bytes: int = 20 * 1024 * 1024 # inbound + outbound attachment limit
|
||||||
sync_stop_grace_seconds: int = 2
|
|
||||||
# Max attachment size accepted for Matrix media handling (inbound + outbound).
|
|
||||||
max_media_bytes: int = 20 * 1024 * 1024
|
|
||||||
allow_from: list[str] = Field(default_factory=list)
|
allow_from: list[str] = Field(default_factory=list)
|
||||||
group_policy: Literal["open", "mention", "allowlist"] = "open"
|
group_policy: Literal["open", "mention", "allowlist"] = "open"
|
||||||
group_allow_from: list[str] = Field(default_factory=list)
|
group_allow_from: list[str] = Field(default_factory=list)
|
||||||
|
|||||||
Reference in New Issue
Block a user