pass message object through signal instead of just the id

This commit is contained in:
ouwou
2021-04-13 04:33:19 -04:00
parent 42d38a89b2
commit b6c6c03f87
7 changed files with 16 additions and 21 deletions

View File

@@ -76,10 +76,8 @@ void ChatInputIndicator::OnUserTypingStart(Snowflake user_id, Snowflake channel_
AddUser(channel_id, *user, 10);
}
void ChatInputIndicator::OnMessageCreate(Snowflake message_id) {
const auto msg = Abaddon::Get().GetDiscordClient().GetMessage(message_id);
if (!msg.has_value()) return;
m_typers[msg->ChannelID].erase(msg->Author.ID);
void ChatInputIndicator::OnMessageCreate(const Message &message) {
m_typers[message.ChannelID].erase(message.Author.ID);
ComputeTypingString();
}