1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-12-11 19:37:30 +03:00

Implement Sticky Events MSC4354 (#5028)

* Implement Sticky Events MSC

* Renames

* lint

* some review work

* Update for support for 4-ples

* fix lint

* pull through method

* Fix the mistake

* More tests to appease SC

* Cleaner code

* Review cleanup

* Refactors based on review.

* lint

* Store sticky event expiry TS at insertion time.

* proper type
This commit is contained in:
Will Hunt
2025-10-07 18:24:10 +01:00
committed by GitHub
parent a03cf054a8
commit b84a73c7cc
11 changed files with 953 additions and 71 deletions

View File

@@ -54,7 +54,7 @@ export class ClientStoppedError extends Error {
}
/**
* This error is thrown when the Homeserver does not support the delayed events enpdpoints.
* This error is thrown when the Homeserver does not support the delayed events endpoints.
*/
export class UnsupportedDelayedEventsEndpointError extends Error {
public constructor(
@@ -65,3 +65,16 @@ export class UnsupportedDelayedEventsEndpointError extends Error {
this.name = "UnsupportedDelayedEventsEndpointError";
}
}
/**
* This error is thrown when the Homeserver does not support the sticky events endpoints.
*/
export class UnsupportedStickyEventsEndpointError extends Error {
public constructor(
message: string,
public clientEndpoint: "sendStickyEvent" | "sendStickyStateEvent",
) {
super(message);
this.name = "UnsupportedStickyEventsEndpointError";
}
}