aboutsummaryrefslogtreecommitdiff
path: root/lib/csapi/definitions/wellknown/identity_server.h
diff options
context:
space:
mode:
authorAlexey Rusakov <Kitsune-Ral@users.sf.net>2021-07-10 11:45:28 +0200
committerAlexey Rusakov <Kitsune-Ral@users.sf.net>2021-07-10 11:45:28 +0200
commitbc05d7b2f525d0f9af29f2fc35ce12bf6fe792a7 (patch)
treee64b79b1c30ee52157067c841c34dc2ef26ca65b /lib/csapi/definitions/wellknown/identity_server.h
parentd75b24e3d86e48585af62954e569b806ef1fa552 (diff)
downloadlibquotient-bc05d7b2f525d0f9af29f2fc35ce12bf6fe792a7.tar.gz
libquotient-bc05d7b2f525d0f9af29f2fc35ce12bf6fe792a7.zip
Room: fix the read markers/receipts confusion
This turns the design changes laid out in #464 comments to code: - readMarker() now returns the fully read marker, unlike readMarker(User*) that returns a read receipt, even when called for the local user. - Private::setLastReadEvent() -> setLastReadReceipt(), incorporating the "promotion" logic from promoteReadReceipt(). - The above makes promoteReadReceipt() unneeded; the remaining piece of logic that recalculates the number of unread messages is put to its own method - Private::recalculateUnreadCount(). - Private::updateUnreadCount() is only slightly refreshed, continues to use the fully read marker position (as it used to). - Now that read receipts and fully read markers are managed separately, Private::setLastReadReceipt() has got its counterpart, Private::setFullyReadMarker(); both only update their respective markers locally (emitting signals as needed), without interaction with the homeserver. - Private::markMessagesAsRead() now delegates updating the fully read marker to setFullyReadMarker() and on top of that sends the new fully read marker to the homeserver. - Private::serverReadMarker -> fullyReadUntilEventId (to be really clear what it stores). - The hand-written PostReadMarkersJob is replaced with the generated SetReadMarkerJob that does the same thing (and can update the read receipt on top, though the current code doesn't use that).
Diffstat (limited to 'lib/csapi/definitions/wellknown/identity_server.h')
0 files changed, 0 insertions, 0 deletions