You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-11-26 17:03:12 +03:00
Fix backwards compatibility for redactEvent (#2039)
This commit is contained in:
@@ -3698,24 +3698,24 @@ export class MatrixClient extends EventEmitter {
|
||||
public redactEvent(
|
||||
roomId: string,
|
||||
eventId: string,
|
||||
txnId?: string,
|
||||
txnId?: string | undefined,
|
||||
cbOrOpts?: Callback | IRedactOpts,
|
||||
);
|
||||
public redactEvent(
|
||||
roomId: string,
|
||||
threadId: string | null,
|
||||
eventId: string,
|
||||
txnId?: string,
|
||||
txnId?: string | undefined,
|
||||
cbOrOpts?: Callback | IRedactOpts,
|
||||
);
|
||||
public redactEvent(
|
||||
roomId: string,
|
||||
threadId: string | null,
|
||||
eventId: string,
|
||||
eventId?: string,
|
||||
txnId?: string | Callback | IRedactOpts,
|
||||
cbOrOpts?: Callback | IRedactOpts,
|
||||
): Promise<ISendEventResponse> {
|
||||
if (!threadId?.startsWith(EVENT_ID_PREFIX) && threadId !== null) {
|
||||
if (!eventId || eventId.startsWith(EVENT_ID_PREFIX)) {
|
||||
cbOrOpts = txnId as (Callback | IRedactOpts);
|
||||
txnId = eventId;
|
||||
eventId = threadId;
|
||||
|
||||
Reference in New Issue
Block a user