| author | Stephen Paul Weber
<singpolyma@singpolyma.net> 2023-11-08 18:13:54 UTC |
| committer | Stephen Paul Weber
<singpolyma@singpolyma.net> 2023-11-08 21:16:35 UTC |
| parent | 52e469543170a7cb5aeac6b624ee6e2415218084 |
| xmpp/Chat.hx | +3 | -1 |
diff --git a/xmpp/Chat.hx b/xmpp/Chat.hx index f6e6001..8caf254 100644 --- a/xmpp/Chat.hx +++ b/xmpp/Chat.hx @@ -290,6 +290,7 @@ class DirectChat extends Chat { if (readUpTo() == message.localId || readUpTo() == message.serverId) return; final upTo = message.localId ?? message.serverId; _unreadCount = 0; // TODO + if (upTo == null) return; // Can't mark as read with no id for (recipient in getParticipants()) { // TODO: extended addressing when relevant final stanza = new Stanza("message", { to: recipient, id: ID.long() }) @@ -487,7 +488,8 @@ class Channel extends Chat { public function markReadUpTo(message: ChatMessage) { if (readUpTo() == message.serverId) return; final upTo = message.serverId; - _unreadCount = 0; + _unreadCount = 0; // TODO + if (upTo == null) return; // Can't mark as read with no id final stanza = new Stanza("message", { to: chatId, id: ID.long() }) .tag("displayed", { xmlns: "urn:xmpp:chat-markers:0", id: upTo }).up(); if (message.threadId != null) {