aboutsummaryrefslogtreecommitdiff
path: root/room.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'room.cpp')
-rw-r--r--room.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/room.cpp b/room.cpp
index 1cedab1e..55531824 100644
--- a/room.cpp
+++ b/room.cpp
@@ -608,9 +608,12 @@ void Room::doAddNewMessageEvents(const Events& events)
// the local user, markMessagesAsRead() invocation) to promote their
// read markers over the new message events.
User* firstWriter = connection()->user(events.front()->senderId());
- d->promoteReadMarker(firstWriter, findInTimeline(events.front()->id()));
- qDebug() << "Auto-promoted read marker for" << firstWriter->id()
- << "to" << *readMarker(firstWriter);
+ if (readMarker(firstWriter) != timelineEdge())
+ {
+ d->promoteReadMarker(firstWriter, findInTimeline(events.front()->id()));
+ qDebug() << "Auto-promoted read marker for" << firstWriter->id()
+ << "to" << *readMarker(firstWriter);
+ }
if( !d->unreadMessages && newUnreadMessages > 0)
{