Merge pull request #39 from Zander671/master

Fix another unchecked optional
This commit is contained in:
ouwou
2021-10-12 18:41:10 +00:00
committed by GitHub

View File

@@ -173,7 +173,8 @@ void DiscordClient::FetchMessagesInChannelBefore(Snowflake channel_id, Snowflake
m_store.BeginTransaction();
for (auto &msg : msgs) {
StoreMessageData(msg);
AddUserToGuild(msg.Author.ID, *msg.GuildID);
if (msg.GuildID.has_value())
AddUserToGuild(msg.Author.ID, *msg.GuildID);
}
m_store.EndTransaction();