fix(matrix): correct e2eeEnabled camelCase alias mapping

The pydantic to_camel function generates 'e2EeEnabled' (treating 'ee'
as a word boundary) for the field 'e2ee_enabled'. Users writing
'e2eeEnabled' in their config get the default value instead.

Fix: add explicit alias='e2eeEnabled' to override the incorrect
auto-generated alias. Both 'e2eeEnabled' and 'e2ee_enabled' now work.

Fixes #2851
This commit is contained in:
bahtya 2026-04-07 11:24:29 +08:00 committed by Xubin Ren
parent bf459c7887
commit cefeddab8e

View File

@ -209,7 +209,7 @@ class MatrixConfig(Base):
password: str = ""
access_token: str = ""
device_id: str = ""
e2ee_enabled: bool = True
e2ee_enabled: bool = Field(default=True, alias="e2eeEnabled")
sync_stop_grace_seconds: int = 2
max_media_bytes: int = 20 * 1024 * 1024
allow_from: list[str] = Field(default_factory=list)