aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKitsune Ral <Kitsune-Ral@users.sf.net>2018-03-07 19:04:11 +0900
committerKitsune Ral <Kitsune-Ral@users.sf.net>2018-03-07 19:04:11 +0900
commit7340ba9ac15202b065c121f43b9f7b5e1cf0b5f3 (patch)
treeaff45ff0f74973e48d6f8cfa94a533a95f832cbe
parent5b2fb28a8ccc434a80a062b187236bb6af8c9912 (diff)
downloadlibquotient-7340ba9ac15202b065c121f43b9f7b5e1cf0b5f3.tar.gz
libquotient-7340ba9ac15202b065c121f43b9f7b5e1cf0b5f3.zip
Fix resetting the read marker if a read receipt comes from the sync
Closes #184.
-rw-r--r--room.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/room.cpp b/room.cpp
index 5fffec19..51fe83ec 100644
--- a/room.cpp
+++ b/room.cpp
@@ -1477,6 +1477,8 @@ void Room::processEphemeralEvent(EventPtr event)
{
for( const Receipt& r: p.receipts )
{
+ if (r.userId == connection()->userId())
+ continue; // FIXME, #185
auto u = user(r.userId);
if (memberJoinState(u) == JoinState::Join)
d->promoteReadMarker(u, newMarker);
@@ -1491,6 +1493,8 @@ void Room::processEphemeralEvent(EventPtr event)
// Otherwise, blindly store the event id for this user.
for( const Receipt& r: p.receipts )
{
+ if (r.userId == connection()->userId())
+ continue; // FIXME, #185
auto u = user(r.userId);
if (memberJoinState(u) == JoinState::Join &&
readMarker(u) == timelineEdge())