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

Commit 470bc0f

Browse files
authored
Merge pull request #6686 from matrix-org/travis/widget-redact
Special case redaction event sending from widgets per MSC2762
2 parents 22a78cf + cafa52c commit 470bc0f

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
@@ -143,6 +143,9 @@ export class StopGapWidgetDriver extends WidgetDriver {
143143
if (stateKey !== null) {
144144
// state event
145145
r = await client.sendStateEvent(roomId, eventType, content, stateKey);
146+
} else if (eventType === EventType.RoomRedaction) {
147+
// special case: extract the `redacts` property and call redact
148+
r = await client.redactEvent(roomId, content['redacts']);
146149
} else {
147150
// message event
148151
r = await client.sendEvent(roomId, eventType, content);

0 commit comments

Comments
 (0)