diff options
author | George Hazan <ghazan@miranda.im> | 2018-11-27 17:42:17 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-11-27 17:42:17 +0300 |
commit | 8a57ca7afd4cce23a6a9112a64e3a2aeee7d96be (patch) | |
tree | 3d0d33ff3fe66afb1bcf8bc820b3f109a1132754 /protocols/Discord/src/guilds.cpp | |
parent | e7bfa7d9faa1d4e328ca0727174cddc0ca0cd808 (diff) |
Discord: fix for guild sync
Diffstat (limited to 'protocols/Discord/src/guilds.cpp')
-rw-r--r-- | protocols/Discord/src/guilds.cpp | 6 |
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; } |