Skip to content

A room with only private read receipt keeps being marked as unread. #23027

Closed
matrix-org/matrix-js-sdk
#2585

Description

@ara4n

Steps to reproduce

  1. Turn on private RRs
  2. Get DMed by a user
  3. Answer the DM
  4. Send some messages in the DM
  5. Observe that the DM subsequently gets incorrectly flagged as unread (presumably because there is no RM or RR in the room at all, only a private RR?)

(appaprently the room where this was happening (!iKaweBjcahmPGZlkqW:thirdroom.dev) had a prefixed private RR in it: $OyTvOe_8mTpK_f_Lf9cLR63ZdyOvIGvCCQrGqBokXxg )

Outcome

What did you expect?

Random DMs shouldn't keep appearing as unread.

Operating system

No response

Application version

nightly

How did you install the app?

nightly

Homeserver

matrix.org

Will you send logs?

No

Activity

  1. added
    S-MinorImpairs non-critical functionality or suitable workarounds exist
    O-UncommonMost users are unlikely to come across this or unexpected workflow
    on Aug 8, 2022
  2. self-assigned this
    on Aug 8, 2022
  3. turt2live commented on Aug 8, 2022

    @turt2live
    Member

    With all the data we have on this, I think it's a long-standing issue to do with Element "randomly" (deterministic symptoms not yet discovered) deciding that rooms are suddenly unread during startup. Usually this happens to larger rooms, but can happen to DMs as well.

    I don't think this is related to recent Synapse work or hidden read receipts, at least given the problem description.

  4. removed their assignment
    on Aug 10, 2022
  5. added
    O-OccasionalAffects or can be seen by some users regularly or most users rarely
    and removed
    O-UncommonMost users are unlikely to come across this or unexpected workflow
    on Aug 11, 2022
  6. SimonBrandner commented on Aug 11, 2022

    @SimonBrandner
    Contributor

    It turns out this is an RR issue after all: I've just reproduced it by accident in my DM with Dave. The Room::getEventReadUpTo() method fails under certain conditions: if we don't have RRs of all types, we fallback to using timestamps for the comparison, the problem then is that the ts comparison algorithm doesn't take into account the stable private read receipt not being defined, so it fails and we fallback again to picking by hand, this means the unstable private RR is chosen because it tends to have precednce even if there actually is a new RR of m.read type.

    This can now be considered a release blocker though a fairly simple one to fix and test

  7. added a commit that references this issue on Aug 22, 2022
    c2deb2a
  8. added a commit that references this issue on Sep 1, 2022
    12f88b5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions