From b6c6c03f879f282110b08a2d41a5cac143ff41aa Mon Sep 17 00:00:00 2001 From: ouwou <26526779+ouwou@users.noreply.github.com> Date: Tue, 13 Apr 2021 04:33:19 -0400 Subject: pass message object through signal instead of just the id --- components/chatinputindicator.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'components/chatinputindicator.cpp') diff --git a/components/chatinputindicator.cpp b/components/chatinputindicator.cpp index e6c9890..3b43b7e 100644 --- a/components/chatinputindicator.cpp +++ b/components/chatinputindicator.cpp @@ -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(); } -- cgit v1.2.3