cache channels

This commit is contained in:
ouwou
2020-12-10 03:50:40 -05:00
parent e045452875
commit 850b87c1ec
11 changed files with 330 additions and 204 deletions

View File

@@ -178,7 +178,7 @@ void ChatWindow::ProcessNewMessage(Snowflake id, bool prepend) {
if (should_attach) {
header = last_row;
} else {
const auto guild_id = client.GetChannel(m_active_channel)->GuildID;
const auto guild_id = *client.GetChannel(m_active_channel)->GuildID;
const auto user_id = data->Author.ID;
const auto user = client.GetUser(user_id);
if (!user.has_value()) return;