Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement MSC3912: Relation-based redactions #2954

Merged
merged 10 commits into from
Dec 20, 2022
8 changes: 7 additions & 1 deletion src/@types/requests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,13 @@ export interface IJoinRoomOpts {

export interface IRedactOpts {
reason?: string;
// also delete related events, if the server supports it (MSC3912)
/**
* Also try to delete related events of the relation types in this array.
weeman1337 marked this conversation as resolved.
Show resolved Hide resolved
* <b>Raises an Error if the server does not support it.</b>
* Check for server-side support before using this param with
* <code>client.canSupport.get(Feature.RelationBasedRedactions)</code>.
* {@link https://github.com/matrix-org/matrix-spec-proposals/pull/3912}
*/
with_relations?: Array<RelationType | string>;
}

Expand Down
2 changes: 1 addition & 1 deletion src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4445,7 +4445,7 @@ export class MatrixClient extends TypedEventEmitter<EmittedEvents, ClientEventHa

/**
* @param txnId - transaction id. One will be made up if not supplied.
* @param opts - Options to pass on, may contain `reason` an `with_relations` (MSC3912).
* @param opts - Options to pass on, may contain `reason` and `with_relations` (MSC3912)
* @returns Promise which resolves: TODO
* @returns Rejects: with an error response.
* @throws Error if called with `with_relations` (MSC3912) but the server does not support it.
Expand Down