summaryrefslogtreecommitdiff
path: root/protocols/Discord/src/groupchat.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2017-02-22 18:34:13 +0300
committerGeorge Hazan <ghazan@miranda.im>2017-02-22 18:34:13 +0300
commite166b028427169375fb5da938ada6f3f3db520d2 (patch)
tree0e2de73477db8ed1300073004d6e255baf7bcfa5 /protocols/Discord/src/groupchat.cpp
parentb36289b6ed6dfdc74e42ac89a8d873cee058453d (diff)
major rework of Discord:
- CDiscordGuild - a class to utilize all guild-related activity; - all guild related code moved to the separate module; - fix for online guild channel creation; - version bump;
Diffstat (limited to 'protocols/Discord/src/groupchat.cpp')
-rw-r--r--protocols/Discord/src/groupchat.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/protocols/Discord/src/groupchat.cpp b/protocols/Discord/src/groupchat.cpp
index 6641a4fd88..ac9cf235d5 100644
--- a/protocols/Discord/src/groupchat.cpp
+++ b/protocols/Discord/src/groupchat.cpp
@@ -25,15 +25,12 @@ enum {
/////////////////////////////////////////////////////////////////////////////////////////
-void CDiscordProto::BuildStatusList(SnowFlake guildId, const CMStringW &wszChannelId)
+void CDiscordProto::BuildStatusList(const CDiscordGuild *pGuild, const CMStringW &wszChannelId)
{
Chat_AddGroup(m_szModuleName, wszChannelId, L"@owner");
- for (int i = 0; i < arRoles.getCount(); i++) {
- CDiscordRole &r = arRoles[i];
- if (r.guildId == guildId)
- Chat_AddGroup(m_szModuleName, wszChannelId, r.wszName);
- }
+ for (int i = 0; i < pGuild->arRoles.getCount(); i++)
+ Chat_AddGroup(m_szModuleName, wszChannelId, pGuild->arRoles[i].wszName);
}
/////////////////////////////////////////////////////////////////////////////////////////