mark channels as unread on MESSAGE_CREATE

This commit is contained in:
ouwou
2021-12-05 04:07:30 -05:00
parent 1ea2811713
commit d63941797f
2 changed files with 5 additions and 1 deletions

View File

@@ -1444,6 +1444,9 @@ 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_signal_message_create.emit(data);
}