Show typed error when matrix_2_0 mode is forced without homeserver MSC4354 support (#4017)

Show typed error when matrix_2_0 mode is forced without homeserver MSC4354 support
This commit is contained in:
fkwp
2026-06-10 18:48:16 +02:00
committed by GitHub
parent 3a824dfff0
commit 73ccc5f483
8 changed files with 380 additions and 24 deletions

View File

@@ -21,6 +21,7 @@ export enum ErrorCode {
/** LiveKit indicates that the server has hit its track limits */
INSUFFICIENT_CAPACITY_ERROR = "INSUFFICIENT_CAPACITY_ERROR",
E2EE_NOT_SUPPORTED = "E2EE_NOT_SUPPORTED",
STICKY_EVENTS_NOT_SUPPORTED = "STICKY_EVENTS_NOT_SUPPORTED",
OPEN_ID_ERROR = "OPEN_ID_ERROR",
NO_MATRIX_2_AUTHORIZATION_SERVICE = "NO_MATRIX_2_0_AUTHORIZATION_SERVICE",
SFU_ERROR = "SFU_ERROR",
@@ -125,6 +126,22 @@ export class MembershipManagerError extends ElementCallError {
}
}
/**
* Error indicating that this deployment pins `matrix_rtc_mode=matrix_2_0` in
* config.json but the homeserver does not advertise MSC4354 (sticky events),
* which the Matrix 2.0 mode requires.
*/
export class StickyEventsRequiredError extends ElementCallError {
public constructor() {
super(
t("error.sticky_events_required"),
ErrorCode.STICKY_EVENTS_NOT_SUPPORTED,
ErrorCategory.CONFIGURATION_ISSUE,
t("error.sticky_events_required_description"),
);
}
}
/**
* Error indicating that end-to-end encryption is not supported in the current environment.
*/