You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-08-06 12:02:40 +03:00
Fix message ordering in threads (#2215)
This commit is contained in:
@@ -30,6 +30,12 @@ export function eventMapperFor(client: MatrixClient, options: MapperOpts): Event
|
||||
|
||||
function mapper(plainOldJsObject: Partial<IEvent>) {
|
||||
const event = new MatrixEvent(plainOldJsObject);
|
||||
|
||||
const room = client.getRoom(event.getRoomId());
|
||||
if (room?.threads.has(event.getId())) {
|
||||
event.setThread(room.threads.get(event.getId()));
|
||||
}
|
||||
|
||||
if (event.isEncrypted()) {
|
||||
if (!preventReEmit) {
|
||||
client.reEmitter.reEmit(event, [
|
||||
|
Reference in New Issue
Block a user