1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-11-26 17:03:12 +03:00

Encode event IDs when redacting events

Because v3 rooms are a thing.
This commit is contained in:
Travis Ralston
2019-06-05 15:27:55 -06:00
parent 570ce4f4b7
commit a30ef7250b

View File

@@ -1887,8 +1887,10 @@ function _sendEventHttpRequest(client, event) {
}
path = utils.encodeUri(pathTemplate, pathParams);
} else if (event.getType() === "m.room.redaction") {
const pathTemplate = `/rooms/$roomId/redact/${event.event.redacts}/$txnId`;
path = utils.encodeUri(pathTemplate, pathParams);
const pathTemplate = `/rooms/$roomId/redact/$redactsEventId/$txnId`;
path = utils.encodeUri(pathTemplate, Object.assign({
$redactsEventId: event.event.redacts,
}, pathParams));
} else {
path = utils.encodeUri(
"/rooms/$roomId/send/$eventType/$txnId", pathParams,