From 53c26b123b267420707d9d337c4a2d3f32c8be81 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 24 Feb 2020 18:04:30 +0300 Subject: Discord: temporary token not to be saved --- protocols/Discord/src/server.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'protocols/Discord/src/server.cpp') diff --git a/protocols/Discord/src/server.cpp b/protocols/Discord/src/server.cpp index f801a1678f..c6b127c8cd 100644 --- a/protocols/Discord/src/server.cpp +++ b/protocols/Discord/src/server.cpp @@ -286,7 +286,13 @@ void CDiscordProto::OnReceiveToken(NETLIBHTTPREQUEST *pReply, AsyncHttpRequest*) if (!root) ConnectionFailed(LOGINERR_NOSERVER); else { - SaveToken(root.data()); + auto &data = root.data(); + CMStringA szToken = data["token"].as_mstring(); + if (szToken.IsEmpty()) + return; + + m_szAccessToken = szToken.Detach(); + setString("AccessToken", m_szAccessToken); RetrieveMyInfo(); } } -- cgit v1.2.3