summaryrefslogtreecommitdiff
path: root/protocols/Discord/src/guilds.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-11-27 17:42:17 +0300
committerGeorge Hazan <ghazan@miranda.im>2018-11-27 17:42:17 +0300
commit8a57ca7afd4cce23a6a9112a64e3a2aeee7d96be (patch)
tree3d0d33ff3fe66afb1bcf8bc820b3f109a1132754 /protocols/Discord/src/guilds.cpp
parente7bfa7d9faa1d4e328ca0727174cddc0ca0cd808 (diff)
Discord: fix for guild sync
Diffstat (limited to 'protocols/Discord/src/guilds.cpp')
-rw-r--r--protocols/Discord/src/guilds.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/protocols/Discord/src/guilds.cpp b/protocols/Discord/src/guilds.cpp
index 639937b4c3..b77f2b67b0 100644
--- a/protocols/Discord/src/guilds.cpp
+++ b/protocols/Discord/src/guilds.cpp
@@ -122,9 +122,11 @@ void CDiscordProto::ProcessGuild(const JSONNode &p)
if (pGuild == nullptr) {
pGuild = new CDiscordGuild(guildId);
arGuilds.insert(pGuild);
+ }
+ if (!pGuild->bSynced)
GatewaySendGuildInfo(guildId);
- }
+
pGuild->ownerId = ::getId(p["owner_id"]);
pGuild->wszName = p["name"].as_mstring();
pGuild->groupId = Clist_GroupCreate(Clist_GroupExists(m_wszDefaultGroup), pGuild->wszName);
@@ -292,4 +294,6 @@ void CDiscordProto::ParseGuildContents(CDiscordGuild *pGuild, const JSONNode &pR
if (oldMsgId != 0 && it->lastMsgId > oldMsgId)
RetrieveHistory(it->hContact, MSG_AFTER, oldMsgId, 99);
}
+
+ pGuild->bSynced = true;
}