You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-11-26 17:03:12 +03:00
emit from MatrixEvent.makeReplaced instead of Room
now that event can be replaced from Relations instead of Room Also make `makeReplaced` non-destructive by not touching the original event.content, so it can be undone by later calls.
This commit is contained in:
@@ -4168,6 +4168,10 @@ function _PojoToMatrixEventMapper(client) {
|
||||
]);
|
||||
event.attemptDecryption(client._crypto);
|
||||
}
|
||||
const room = client.getRoom(event.getRoomId());
|
||||
if (room) {
|
||||
room.reEmitter.reEmit(event, ["Event.replaced"]);
|
||||
}
|
||||
return event;
|
||||
}
|
||||
return mapper;
|
||||
|
||||
Reference in New Issue
Block a user