diff options
author | George Hazan <ghazan@miranda.im> | 2020-02-24 18:04:30 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2020-02-24 18:04:30 +0300 |
commit | 53c26b123b267420707d9d337c4a2d3f32c8be81 (patch) | |
tree | 6503a81f6a21244bd8203f9014f51762894d9e3d /protocols/Discord/src/server.cpp | |
parent | 7b32f314110ff2cdb2d2ddade8e7b8ff9e5b51fb (diff) |
Discord: temporary token not to be saved
Diffstat (limited to 'protocols/Discord/src/server.cpp')
-rw-r--r-- | protocols/Discord/src/server.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
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(); } } |