summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--protocols/Discord/src/server.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/protocols/Discord/src/server.cpp b/protocols/Discord/src/server.cpp
index ec2e5e816c..2b4882ed37 100644
--- a/protocols/Discord/src/server.cpp
+++ b/protocols/Discord/src/server.cpp
@@ -271,6 +271,18 @@ void CDiscordProto::OnReceiveToken(NETLIBHTTPREQUEST *pReply, AsyncHttpRequest*)
}
}
}
+
+ for (auto &err: root["errors"]["email"]["_errors"]) {
+ CMStringW code(err["code"].as_mstring());
+ CMStringW message(err["message"].as_mstring());
+ if (!code.IsEmpty() || !message.IsEmpty()) {
+ POPUPDATAW popup;
+ popup.lchIcon = IcoLib_GetIconByHandle(Skin_GetIconHandle(SKINICON_ERROR), true);
+ wcscpy_s(popup.lpwzContactName, m_tszUserName);
+ mir_snwprintf(popup.lpwzText, TranslateT("Connection failed.\n%s (%s)."), message.c_str(), code.c_str());
+ PUAddPopupW(&popup);
+ }
+ }
}
ConnectionFailed(LOGINERR_WRONGPASSWORD);
return;