diff options
author | ouwou <26526779+ouwou@users.noreply.github.com> | 2021-12-10 00:15:39 -0500 |
---|---|---|
committer | ouwou <26526779+ouwou@users.noreply.github.com> | 2021-12-10 00:15:39 -0500 |
commit | 0b0135268ec4684dfcdc0a5ae5c8da947bb17e12 (patch) | |
tree | 0128352b9c5fa8e0838531ffa87c64e68cc3f487 /src/discord/discord.cpp | |
parent | 511fb445d15e379d4dd3b7fd137a249c960cf84d (diff) | |
download | abaddon-portaudio-0b0135268ec4684dfcdc0a5ae5c8da947bb17e12.tar.gz abaddon-portaudio-0b0135268ec4684dfcdc0a5ae5c8da947bb17e12.zip |
basic channel mentions count indicator
Diffstat (limited to 'src/discord/discord.cpp')
-rw-r--r-- | src/discord/discord.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/discord/discord.cpp b/src/discord/discord.cpp index a8ceb5b..f21946f 100644 --- a/src/discord/discord.cpp +++ b/src/discord/discord.cpp @@ -1467,9 +1467,10 @@ void DiscordClient::HandleGatewayMessageCreate(const GatewayMessage &msg) { if (data.GuildID.has_value()) AddUserToGuild(data.Author.ID, *data.GuildID); m_last_message_id[data.ChannelID] = data.ID; - const auto iter = m_unread.find(data.ChannelID); - if (iter == m_unread.end()) - m_unread[data.ChannelID] = 0; + m_unread[data.ChannelID]; + if (data.DoesMention(GetUserData().ID)) { + m_unread[data.ChannelID]++; + } m_signal_message_create.emit(data); } |