diff options
-rw-r--r-- | protocols/Discord/src/guilds.cpp | 6 | ||||
-rw-r--r-- | protocols/Discord/src/proto.h | 1 |
2 files changed, 6 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; } diff --git a/protocols/Discord/src/proto.h b/protocols/Discord/src/proto.h index 44b50465a7..b092abaa04 100644 --- a/protocols/Discord/src/proto.h +++ b/protocols/Discord/src/proto.h @@ -116,6 +116,7 @@ struct CDiscordGuild : public MZeroedObject CMStringW wszName; MCONTACT hContact; MGROUP groupId; + bool bSynced = false; LIST<CDiscordUser> arChannels; SESSION_INFO *pParentSi; |