Special case redaction event sending from widgets per MSC2762

Fixes https://github.com/vector-im/element-web/issues/18573
See 853bed2157
pull/21833/head
Travis Ralston 2021-08-25 22:40:51 -06:00
parent ee95e36a7c
commit cafa52c466
1 changed files with 3 additions and 0 deletions

View File

@ -129,6 +129,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);