From 40493350846da0d957015b0f2e7093e59e4b1b4f Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 12 Feb 2025 19:57:52 +0300 Subject: =?UTF-8?q?fixes=20#4869=20(Discord=20=D0=9D=D0=B5=20=D0=BB=D0=BE?= =?UTF-8?q?=D0=B3=D0=B8=D0=BD=D0=B8=D1=82=20=D0=BF=D0=BE=20email)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- protocols/Discord/src/http.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'protocols') diff --git a/protocols/Discord/src/http.cpp b/protocols/Discord/src/http.cpp index c5d5e1e0c0..32976d39cf 100644 --- a/protocols/Discord/src/http.cpp +++ b/protocols/Discord/src/http.cpp @@ -121,11 +121,11 @@ void CDiscordProto::ServerThread(void*) JSONNode root; root << WCHAR_PARAM("password", wszPassword); if (wszEmail.Find('@') == -1) { + // ensure that a phone number begins with + if (wszEmail[0] != '+') wszEmail.Insert(0, L"+"); - root << WCHAR_PARAM("login", wszEmail) ; } - else root << WCHAR_PARAM("email", wszEmail); + root << WCHAR_PARAM("login", wszEmail); Push(new AsyncHttpRequest(this, REQUEST_POST, "/auth/login", &CDiscordProto::OnReceiveToken, &root)); } -- cgit v1.2.3