summaryrefslogtreecommitdiff
path: root/protocols/Discord/src
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/Discord/src')
-rw-r--r--protocols/Discord/src/server.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/protocols/Discord/src/server.cpp b/protocols/Discord/src/server.cpp
index 0c8f31bf5b..eef014b3fa 100644
--- a/protocols/Discord/src/server.cpp
+++ b/protocols/Discord/src/server.cpp
@@ -280,8 +280,10 @@ void CDiscordProto::OnReceiveToken(NETLIBHTTPREQUEST *pReply, AsyncHttpRequest*)
JSONNode root = JSONNode::parse(pReply->pData);
if (root) {
const JSONNode &captcha = root["captcha_key"].as_array();
- if (captcha && captcha.begin()[0].as_mstring() == "captcha-required") {
- debugLogA("captcha required");
+ if (captcha) {
+ for (auto& it : captcha)
+ if (it.as_mstring() == "captcha-required")
+ debugLogA("captcha required");
}
}
ConnectionFailed(LOGINERR_WRONGPASSWORD);