diff options
author | George Hazan <ghazan@miranda.im> | 2020-04-18 17:49:16 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2020-04-18 17:49:16 +0300 |
commit | aa136da0e567cfbb0484177164ef0c7adb1b61fc (patch) | |
tree | 280e8660300d9913b903a1ec8ec57e0ce5993c7b /protocols | |
parent | 18c00edc2e3db21b3b4b36ee8e414ed6779bc8cb (diff) |
fixes #2341 (ICQ перестала подключаться)
Diffstat (limited to 'protocols')
-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 96920310f9..cee7078357 100644 --- a/protocols/ICQ-WIM/src/server.cpp +++ b/protocols/ICQ-WIM/src/server.cpp @@ -562,8 +562,11 @@ void CIcqProto::SetServerStatus(int iStatus) Push(new AsyncHttpRequest(CONN_MAIN, REQUEST_GET, ICQ_API_SERVER "/presence/setState") << AIMSID(this) << CHAR_PARAM("view", szStatus) << INT_PARAM("invisible", invisible)); - if (iStatus == ID_STATUS_OFFLINE) - Push(new AsyncHttpRequest(CONN_MAIN, REQUEST_GET, ICQ_API_SERVER "/aim/endSession", &CIcqProto::OnSessionEnd) << AIMSID(this)); + if (iStatus == ID_STATUS_OFFLINE && !getByte(DB_KEY_PHONEREG)) { + auto *pReq = new AsyncHttpRequest(CONN_MAIN, REQUEST_GET, ICQ_API_SERVER "/aim/endSession", &CIcqProto::OnSessionEnd); + pReq << AIMSID(this) << INT_PARAM("invalidateToken", 1); + Push(pReq); + } int iOldStatus = m_iStatus; m_iStatus = iStatus; ProtoBroadcastAck(0, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE)iOldStatus, m_iStatus); |