Show typed error when matrix_2_0 mode is forced without homeserver MSC4354 support

This commit is contained in:
fkwp
2026-06-05 12:26:31 +02:00
parent ba40490ca4
commit 224cd041af
6 changed files with 269 additions and 14 deletions

View File

@@ -19,6 +19,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",
@@ -123,6 +124,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.
*/