Fix unread marker going back

Receipts must never go back in time.

Fixes: c428e504fe ("Don't show unread marker for outgoing messages")
This commit is contained in:
Simon Ser 2022-02-11 16:06:06 +01:00
parent e91b044134
commit 39c36e7a7b

View file

@ -586,7 +586,7 @@ export default class App extends Component {
}
// Don't show unread marker for my own messages
if (client.isMyNick(msg.prefix.name)) {
if (client.isMyNick(msg.prefix.name) && (!prevReadReceipt || prevReadReceipt.time < msg.tags.time)) {
prevReadReceipt = { time: msg.tags.time };
}