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

Commit

Permalink
Merge pull request #6686 from matrix-org/travis/widget-redact
Browse files Browse the repository at this point in the history
Special case redaction event sending from widgets per MSC2762
  • Loading branch information
turt2live authored Aug 26, 2021
2 parents 22a78cf + cafa52c commit 470bc0f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/stores/widgets/StopGapWidgetDriver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,9 @@ export class StopGapWidgetDriver extends WidgetDriver {
if (stateKey !== null) {
// state event
r = await client.sendStateEvent(roomId, eventType, content, stateKey);
} else if (eventType === EventType.RoomRedaction) {
// special case: extract the `redacts` property and call redact
r = await client.redactEvent(roomId, content['redacts']);
} else {
// message event
r = await client.sendEvent(roomId, eventType, content);
Expand Down

0 comments on commit 470bc0f

Please sign in to comment.