From 1ea28117135a4847c9b000a9e2aba0138a8a4908 Mon Sep 17 00:00:00 2001 From: ouwou <26526779+ouwou@users.noreply.github.com> Date: Sun, 5 Dec 2021 03:59:51 -0500 Subject: dont send acks for channels known to be read --- src/discord/discord.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src') diff --git a/src/discord/discord.cpp b/src/discord/discord.cpp index 5d888f4..34626f3 100644 --- a/src/discord/discord.cpp +++ b/src/discord/discord.cpp @@ -875,6 +875,7 @@ void DiscordClient::UnArchiveThread(Snowflake channel_id, sigc::slot callback) { + if (m_unread.find(channel_id) == m_unread.end()) return; const auto iter = m_last_message_id.find(channel_id); if (iter == m_last_message_id.end()) return; m_http.MakePOST("/channels/" + std::to_string(channel_id) + "/messages/" + std::to_string(iter->second) + "/ack", "{\"token\":null}", [this, callback](const http::response_type &response) { -- cgit v1.2.3