summaryrefslogtreecommitdiff
path: root/protocols
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-11-21 22:03:27 +0300
committerGeorge Hazan <ghazan@miranda.im>2018-11-21 22:03:27 +0300
commitffaa9ee5d7e7c741a00d479734c630cece1e7664 (patch)
treebd3307ffb5c104de43dd8a63747400f99b55b500 /protocols
parent025f4137a8d54ae30ace6291b0cee1ba44288c8e (diff)
valid role, users & channels creation order
Diffstat (limited to 'protocols')
-rw-r--r--protocols/Discord/src/guilds.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/protocols/Discord/src/guilds.cpp b/protocols/Discord/src/guilds.cpp
index 0ed0b6c801..070b6e0ccf 100644
--- a/protocols/Discord/src/guilds.cpp
+++ b/protocols/Discord/src/guilds.cpp
@@ -130,20 +130,20 @@ void CDiscordProto::ProcessGuild(const JSONNode &p)
pGuild->groupId = Clist_GroupCreate(Clist_GroupExists(m_wszDefaultGroup), pGuild->wszName);
GCSessionInfoBase *si = Chat_NewSession(GCW_SERVER, m_szModuleName, pGuild->wszName, pGuild->wszName, pGuild);
- Chat_Control(m_szModuleName, pGuild->wszName, WINDOW_HIDDEN);
- Chat_Control(m_szModuleName, pGuild->wszName, SESSION_ONLINE);
- BuildStatusList(pGuild, pGuild->wszName);
-
- for (auto &it : pGuild->arChatUsers)
- AddGuildUser(pGuild, *it);
-
pGuild->pParentSi = (SESSION_INFO*)si;
pGuild->hContact = si->hContact;
setId(si->hContact, DB_KEY_CHANNELID, guildId);
+ Chat_Control(m_szModuleName, pGuild->wszName, WINDOW_HIDDEN);
+ Chat_Control(m_szModuleName, pGuild->wszName, SESSION_ONLINE);
+
const JSONNode &roles = p["roles"];
for (auto itr = roles.begin(); itr != roles.end(); ++itr)
ProcessRole(pGuild, *itr);
+ BuildStatusList(pGuild, pGuild->wszName);
+
+ for (auto &it : pGuild->arChatUsers)
+ AddGuildUser(pGuild, *it);
const JSONNode &channels = p["channels"];
for (auto itc = channels.begin(); itc != channels.end(); ++itc)