diff options
author | George Hazan <ghazan@miranda.im> | 2020-02-24 12:36:03 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2020-02-24 12:36:03 +0300 |
commit | 89dfd2db2ba84f1d2f6bb35a43256fc8183cb9b0 (patch) | |
tree | 87c63d42e9efddff004379a087fec8e9bedae6fb /protocols | |
parent | 2f8a2b2964dbf1f36db628661978ecd9189c1b1d (diff) |
fixes #2230 (DIscord: Sometimes Miranda continuously fails to connect to Discord server, and somehow logging in on the website fixes this problem )
Diffstat (limited to 'protocols')
-rw-r--r-- | protocols/Discord/src/server.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/protocols/Discord/src/server.cpp b/protocols/Discord/src/server.cpp index 414c22815d..340087bf89 100644 --- a/protocols/Discord/src/server.cpp +++ b/protocols/Discord/src/server.cpp @@ -270,9 +270,12 @@ void CDiscordProto::OnReceiveToken(NETLIBHTTPREQUEST *pReply, AsyncHttpRequest*) if (root) { const JSONNode &captcha = root["captcha_key"].as_array(); if (captcha) { - for (auto& it : captcha) - if (it.as_mstring() == "captcha-required") - debugLogA("captcha required"); + for (auto &it : captcha) { + if (it.as_mstring() == "captcha-required") { + MessageBoxW(NULL, TranslateT("THe server requires you to enter the captcha. Miranda will redirect you to a browser now"), L"Discord", MB_OK | MB_ICONINFORMATION); + Utils_OpenUrl("https://discordapp.com/app"); + } + } } } ConnectionFailed(LOGINERR_WRONGPASSWORD); |