diff options
author | George Hazan <george.hazan@gmail.com> | 2024-05-28 15:31:44 +0300 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2024-05-28 15:31:44 +0300 |
commit | e5ed8c9517c875c2edaf9364fe8257bfac7ee8bd (patch) | |
tree | 58e0704c47cf009e8d560abfbca300bfa9fc0821 | |
parent | 6e82820f46d0e9a817ef0419be1547e2441cb22e (diff) |
fixes #4437 (Discord/Keep status: Discord wont reconnect)
-rw-r--r-- | protocols/Discord/src/options.cpp | 4 | ||||
-rw-r--r-- | protocols/Discord/src/server.cpp | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/protocols/Discord/src/options.cpp b/protocols/Discord/src/options.cpp index ea2d9a1598..28d9d05c43 100644 --- a/protocols/Discord/src/options.cpp +++ b/protocols/Discord/src/options.cpp @@ -85,6 +85,8 @@ public: auto *pReq = new AsyncHttpRequest(m_proto, REQUEST_POST, "/auth/logout", &CDiscordProto::OnReceiveLogout);
pReq->pUserInfo = this;
m_proto->Push(pReq);
+
+ CallService(MS_KS_ENABLEPROTOCOL, FALSE, LPARAM(m_proto->m_szModuleName));
}
void onLogout()
@@ -107,8 +109,6 @@ void CDiscordProto::OnReceiveLogout(MHttpResponse *, AsyncHttpRequest *pReq) m_szAccessToken = 0;
ShutdownSession();
- CallService(MS_KS_ENABLEPROTOCOL, FALSE, LPARAM(m_szModuleName));
-
auto *pDlg = (CDiscardAccountOptions *)pReq->pUserInfo;
pDlg->onLogout();
}
diff --git a/protocols/Discord/src/server.cpp b/protocols/Discord/src/server.cpp index c60e6c23ed..172faebe47 100644 --- a/protocols/Discord/src/server.cpp +++ b/protocols/Discord/src/server.cpp @@ -167,7 +167,7 @@ void CDiscordProto::OnReceiveMyInfo(MHttpResponse *pReply, AsyncHttpRequest*) m_ownId = id;
m_szCookie = pReply->GetCookies();
- CallService(MS_KS_ENABLEPROTOCOL, FALSE, LPARAM(m_szModuleName));
+ CallService(MS_KS_ENABLEPROTOCOL, TRUE, LPARAM(m_szModuleName));
// launch gateway thread
if (m_szGateway.IsEmpty())
|