Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit cafa52c

Browse files
committed
Special case redaction event sending from widgets per MSC2762
Fixes element-hq/element-web#18573 See matrix-org/matrix-spec-proposals@853bed2
1 parent ee95e36 commit cafa52c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/stores/widgets/StopGapWidgetDriver.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,9 @@ export class StopGapWidgetDriver extends WidgetDriver {
129129
if (stateKey !== null) {
130130
// state event
131131
r = await client.sendStateEvent(roomId, eventType, content, stateKey);
132+
} else if (eventType === EventType.RoomRedaction) {
133+
// special case: extract the `redacts` property and call redact
134+
r = await client.redactEvent(roomId, content['redacts']);
132135
} else {
133136
// message event
134137
r = await client.sendEvent(roomId, eventType, content);

0 commit comments

Comments
 (0)