summaryrefslogtreecommitdiff
path: root/protocols/Teams/src/teams_endpoint.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2025-04-03 22:13:22 +0300
committerGeorge Hazan <george.hazan@gmail.com>2025-04-03 22:13:27 +0300
commitfc73bfb84eeaf09ef147774c92ea2b8592032122 (patch)
tree67737f47161e96c59488a7fc3eca82960a8b276c /protocols/Teams/src/teams_endpoint.cpp
parent0f361039b66b42b704b6b3601a1c3a88e317cc7d (diff)
Teams: minus polling
Diffstat (limited to 'protocols/Teams/src/teams_endpoint.cpp')
-rw-r--r--protocols/Teams/src/teams_endpoint.cpp19
1 files changed, 4 insertions, 15 deletions
diff --git a/protocols/Teams/src/teams_endpoint.cpp b/protocols/Teams/src/teams_endpoint.cpp
index 39b6958abb..ead0857bf0 100644
--- a/protocols/Teams/src/teams_endpoint.cpp
+++ b/protocols/Teams/src/teams_endpoint.cpp
@@ -1,5 +1,5 @@
/*
-Copyright (c) 2015-25 Miranda NG team (https://miranda-ng.org)
+Copyright (c) 2025 Miranda NG team (https://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@@ -17,15 +17,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "stdafx.h"
-void CTeamsProto::ProcessTimer()
-{
- if (!IsOnline())
- return;
-
- PushRequest(new GetContactListRequest());
- SendPresence();
-}
-
void CTeamsProto::SendCreateEndpoint()
{
auto *pReq = new AsyncHttpRequest(REQUEST_POST, HOST_DEFAULT, "/users/ME/endpoints", &CTeamsProto::OnEndpointCreated);
@@ -83,19 +74,17 @@ void CTeamsProto::OnEndpointCreated(MHttpResponse *response, AsyncHttpRequest*)
if (name == "registrationToken")
m_szToken = val.Detach();
else if (name == "endpointId")
- m_szId = val.Detach();
+ m_szEndpoint = val.Detach();
}
}
- if (m_szId && m_hPollingThread == nullptr)
- ForkThread(&CTeamsProto::PollingThread);
-
+ StartTrouter();
PushRequest(new CreateSubscriptionsRequest());
}
void CTeamsProto::OnEndpointDeleted(MHttpResponse *, AsyncHttpRequest *)
{
- m_szId = nullptr;
+ m_szEndpoint = nullptr;
m_szToken = nullptr;
}