Advance read receipts into trailing events without tiles

This changes read receipt sending logic to allow it advance further into events
without tiles (such as edits or reactions) that may exist after the last
displayed event.

By allowing the read receipt to advance past such events, this also marks as
read any related notifications. For example, edits trigger notifications by
default since they are `m.room.message` events, and with this change, such edit
notifications can finally be marked read.

Part of https://github.com/vector-im/riot-web/issues/9745
This commit is contained in:
J. Ryan Stinnett 2019-06-03 17:51:40 +01:00
parent ad84144543
commit 96b213e7cb
3 changed files with 37 additions and 3 deletions

View file

@ -45,6 +45,8 @@ export default function shouldHideEvent(ev) {
// Hide redacted events
if (ev.isRedacted() && !isEnabled('showRedactions')) return true;
// Hide replacement events since they update the original tile
if (ev.isRelation("m.replace")) return true;
const eventDiff = memberEventDiff(ev);