Merge pull request #6686 from matrix-org/travis/widget-redact

Special case redaction event sending from widgets per MSC2762
This commit is contained in:
Travis Ralston
2021-08-26 10:47:17 -06:00
committed by GitHub
@@ -143,6 +143,9 @@ export class StopGapWidgetDriver extends WidgetDriver {
if (stateKey !== null) { if (stateKey !== null) {
// state event // state event
r = await client.sendStateEvent(roomId, eventType, content, stateKey); 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 { } else {
// message event // message event
r = await client.sendEvent(roomId, eventType, content); r = await client.sendEvent(roomId, eventType, content);