diff options
Diffstat (limited to 'protocols/Discord')
-rw-r--r-- | protocols/Discord/src/groupchat.cpp | 10 | ||||
-rw-r--r-- | protocols/Discord/src/guilds.cpp | 5 |
2 files changed, 5 insertions, 10 deletions
diff --git a/protocols/Discord/src/groupchat.cpp b/protocols/Discord/src/groupchat.cpp index c353879559..8b68a6a20b 100644 --- a/protocols/Discord/src/groupchat.cpp +++ b/protocols/Discord/src/groupchat.cpp @@ -80,7 +80,7 @@ void CDiscordProto::Chat_SendPrivateMessage(GCHOOK *gch) return; setId(hContact, DB_KEY_ID, userId); - setId(hContact, DB_KEY_CHANNELID, _wtoi64(gch->ptszID)); + setId(hContact, DB_KEY_CHANNELID, _wtoi64(gch->si->ptszID)); setWString(hContact, "Nick", gch->ptszNick); Contact_Hide(hContact); db_set_dw(hContact, "Ignore", "Mask1", 0); @@ -92,7 +92,7 @@ void CDiscordProto::Chat_SendPrivateMessage(GCHOOK *gch) void CDiscordProto::Chat_ProcessLogMenu(GCHOOK *gch) { - CDiscordUser *pUser = FindUserByChannel(_wtoi64(gch->ptszID)); + CDiscordUser *pUser = FindUserByChannel(_wtoi64(gch->si->ptszID)); if (pUser == nullptr) return; @@ -152,7 +152,7 @@ int CDiscordProto::GroupchatEventHook(WPARAM, LPARAM lParam) if (gch == nullptr) return 0; - if (mir_strcmpi(gch->pszModule, m_szModuleName)) + if (mir_strcmpi(gch->si->pszModule, m_szModuleName)) return 0; switch (gch->iType) { @@ -165,7 +165,7 @@ int CDiscordProto::GroupchatEventHook(WPARAM, LPARAM lParam) if (pos != -1) { auto wszWord = wszText.Left(pos); wszWord.Trim(); - if (auto *si = g_chatApi.SM_FindSession(gch->ptszID, gch->pszModule)) { + if (auto *si = g_chatApi.SM_FindSession(gch->si->ptszID, gch->si->pszModule)) { USERINFO *pUser = nullptr; for (auto &U : si->getUserList()) @@ -184,7 +184,7 @@ int CDiscordProto::GroupchatEventHook(WPARAM, LPARAM lParam) Chat_UnescapeTags(wszText.GetBuffer()); JSONNode body; body << WCHAR_PARAM("content", wszText); - CMStringA szUrl(FORMAT, "/channels/%S/messages", gch->ptszID); + CMStringA szUrl(FORMAT, "/channels/%S/messages", gch->si->ptszID); Push(new AsyncHttpRequest(this, REQUEST_POST, szUrl, nullptr, &body)); } break; diff --git a/protocols/Discord/src/guilds.cpp b/protocols/Discord/src/guilds.cpp index 3408141ecf..c19237c7e4 100644 --- a/protocols/Discord/src/guilds.cpp +++ b/protocols/Discord/src/guilds.cpp @@ -17,11 +17,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include "stdafx.h" -class CMsgDialog : public CSrmmBaseDialog -{ - CMsgDialog(); // just to suppress compiler's warnings, never implemented -}; - int compareUsers(const CDiscordUser *p1, const CDiscordUser *p2); static int compareRoles(const CDiscordRole *p1, const CDiscordRole *p2) |