summaryrefslogtreecommitdiff
path: root/protocols/Discord/src/dispatch.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/Discord/src/dispatch.cpp')
-rw-r--r--protocols/Discord/src/dispatch.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/protocols/Discord/src/dispatch.cpp b/protocols/Discord/src/dispatch.cpp
index 01ccef590f..4f2d25d35d 100644
--- a/protocols/Discord/src/dispatch.cpp
+++ b/protocols/Discord/src/dispatch.cpp
@@ -172,7 +172,8 @@ void CDiscordProto::OnCommandFriendRemoved(const JSONNode &pRoot)
void CDiscordProto::OnCommandGuildCreated(const JSONNode &pRoot)
{
- ProcessGuild(pRoot);
+ if (m_bUseGroupchats)
+ ProcessGuild(pRoot);
}
void CDiscordProto::OnCommandGuildDeleted(const JSONNode &pRoot)
@@ -505,8 +506,9 @@ void CDiscordProto::OnCommandReady(const JSONNode &pRoot)
m_szGatewaySessionId = pRoot["session_id"].as_mstring();
- for (auto &it : pRoot["guilds"])
- ProcessGuild(it);
+ if (m_bUseGroupchats)
+ for (auto &it : pRoot["guilds"])
+ ProcessGuild(it);
for (auto &it : pRoot["relationships"]) {
CDiscordUser *pUser = PrepareUser(it["user"]);