diff --git a/src/app/features/room/message/Message.tsx b/src/app/features/room/message/Message.tsx index 98e7e927a..053c5a17e 100644 --- a/src/app/features/room/message/Message.tsx +++ b/src/app/features/room/message/Message.tsx @@ -386,9 +386,9 @@ function MessageInternal( useEffect(() => { const triggerTimelineRegroup = () => { - room.emit(RoomEvent.Timeline, mEvent, room, false, false, { - liveEvent: true, - } as IRoomTimelineData); + // A Local Echo update seems to trigger a visual refresh without + // scrolling the viewport. + room.emit(RoomEvent.LocalEchoUpdated, mEvent, room); }; const onUpdate = () => { @@ -396,6 +396,11 @@ function MessageInternal( triggerTimelineRegroup(); }; + if (mEvent.getClearContent()) { + setContentVersion((v) => (v === 0 ? 1 : v)); + triggerTimelineRegroup(); + } + mEvent.on(MatrixEventEvent.Decrypted, onUpdate); mEvent.on(MatrixEventEvent.Replaced, onUpdate); return () => {