diff options
author | ouwou <26526779+ouwou@users.noreply.github.com> | 2021-12-05 03:59:51 -0500 |
---|---|---|
committer | ouwou <26526779+ouwou@users.noreply.github.com> | 2021-12-05 04:00:02 -0500 |
commit | 1ea28117135a4847c9b000a9e2aba0138a8a4908 (patch) | |
tree | 37c819914e7eb6f6d2d8da929aeb534030624f12 /src | |
parent | af567847970121765674dc8d0542b9c4a1f89ed1 (diff) | |
download | abaddon-portaudio-1ea28117135a4847c9b000a9e2aba0138a8a4908.tar.gz abaddon-portaudio-1ea28117135a4847c9b000a9e2aba0138a8a4908.zip |
dont send acks for channels known to be read
Diffstat (limited to 'src')
-rw-r--r-- | src/discord/discord.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
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<void(Discor } void DiscordClient::MarkAsRead(Snowflake channel_id, sigc::slot<void(DiscordError code)> 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) { |