From fc73bfb84eeaf09ef147774c92ea2b8592032122 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 3 Apr 2025 22:13:22 +0300 Subject: Teams: minus polling --- protocols/Teams/src/teams_endpoint.cpp | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) (limited to 'protocols/Teams/src/teams_endpoint.cpp') 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 . #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; } -- cgit v1.2.3