3
0
mirror of https://github.com/ergochat/ergo.git synced 2024-11-22 03:49:27 +01:00

Merge pull request #1962 from slingamn/readmarker_again

only send MARKREAD to sessions with the read-marker cap
This commit is contained in:
Shivaram Lingamneni 2022-05-20 02:03:31 -04:00 committed by GitHub
commit 40d70b8aeb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2784,7 +2784,7 @@ func markReadHandler(server *Server, client *Client, msg ircmsg.Message, rb *Res
// successful update (i.e. it moved the stored timestamp forward): // successful update (i.e. it moved the stored timestamp forward):
// inform other sessions // inform other sessions
for _, session := range client.Sessions() { for _, session := range client.Sessions() {
if session != rb.session { if session != rb.session && session.capabilities.Has(caps.ReadMarker) {
session.Send(nil, server.name, "MARKREAD", unfoldedTarget, readTimestamp) session.Send(nil, server.name, "MARKREAD", unfoldedTarget, readTimestamp)
} }
} }