diff options
Diffstat (limited to 'protocols/ICQ-WIM/src/server.cpp')
-rw-r--r-- | protocols/ICQ-WIM/src/server.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/protocols/ICQ-WIM/src/server.cpp b/protocols/ICQ-WIM/src/server.cpp index d39f2bfac9..5c6ec298ae 100644 --- a/protocols/ICQ-WIM/src/server.cpp +++ b/protocols/ICQ-WIM/src/server.cpp @@ -80,13 +80,17 @@ void CIcqProto::CheckPassword() char mirVer[100]; Miranda_GetVersionText(mirVer, _countof(mirVer)); + CMStringW wszId(m_szEmail); + if (wszId.IsEmpty()) + wszId.Format(L"%d", (DWORD)m_dwUin); + m_szAToken = getMStringA(DB_KEY_ATOKEN); m_iRClientId = getDword(DB_KEY_RCLIENTID); m_szSessionKey = getMStringA(DB_KEY_SESSIONKEY); if (m_szAToken.IsEmpty() || m_szSessionKey.IsEmpty()) { auto *pReq = new AsyncHttpRequest(CONN_MAIN, REQUEST_POST, "https://api.login.icq.net/auth/clientLogin", &CIcqProto::OnCheckPassword); pReq << CHAR_PARAM("clientName", "Miranda NG") << CHAR_PARAM("clientVersion", mirVer) << CHAR_PARAM("devId", ICQ_APP_ID) - << CHAR_PARAM("f", "json") << CHAR_PARAM("tokenType", "longTerm") << INT_PARAM("s", m_dwUin) << WCHAR_PARAM("pwd", m_szPassword); + << CHAR_PARAM("f", "json") << CHAR_PARAM("tokenType", "longTerm") << WCHAR_PARAM("s", wszId) << WCHAR_PARAM("pwd", m_szPassword); pReq->flags |= NLHRF_NODUMPSEND; Push(pReq); } @@ -184,7 +188,6 @@ MCONTACT CIcqProto::ParseBuddyInfo(const JSONNode &buddy, MCONTACT hContact) Json2string(hContact, buddy, "cellNumber", "Cellular"); Json2string(hContact, buddy, "phoneNumber", "Phone"); Json2string(hContact, buddy, "workNumber", "CompanyPhone"); - Json2string(hContact, buddy, "emailId", "e-mail"); // zero here means that a contact is currently online int lastSeen = buddy["lastseen"].as_int(); |