diff options
author | ouwou <26526779+ouwou@users.noreply.github.com> | 2021-07-27 22:54:17 -0400 |
---|---|---|
committer | ouwou <26526779+ouwou@users.noreply.github.com> | 2021-07-27 22:54:17 -0400 |
commit | 9d2d13a3898f05f9e8189f99087198726d476e1b (patch) | |
tree | a5e159e426f30920b136ba5137d76366dffe516b /discord/discord.cpp | |
parent | 1936f9ab8ab8687e3200a0ea31937339f9264c9e (diff) | |
download | abaddon-portaudio-9d2d13a3898f05f9e8189f99087198726d476e1b.tar.gz abaddon-portaudio-9d2d13a3898f05f9e8189f99087198726d476e1b.zip |
very rudimentary thread support
Diffstat (limited to 'discord/discord.cpp')
-rw-r--r-- | discord/discord.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/discord/discord.cpp b/discord/discord.cpp index 8dc1ef8..2c0c7d7 100644 --- a/discord/discord.cpp +++ b/discord/discord.cpp @@ -1209,7 +1209,7 @@ void DiscordClient::ProcessNewGuild(GuildData &guild) { m_store.BeginTransaction(); m_store.SetGuild(guild.ID, guild); - if (guild.Channels.has_value()) + if (guild.Channels.has_value()) { for (auto &c : *guild.Channels) { c.GuildID = guild.ID; m_store.SetChannel(c.ID, c); @@ -1218,6 +1218,14 @@ void DiscordClient::ProcessNewGuild(GuildData &guild) { m_store.SetPermissionOverwrite(c.ID, p.ID, p); } } + } + + if (guild.Threads.has_value()) { + for (auto& c : *guild.Threads) { + c.GuildID = guild.ID; + m_store.SetChannel(c.ID, c); + } + } for (auto &r : *guild.Roles) m_store.SetRole(r.ID, r); |