diff options
author | George Hazan <george.hazan@gmail.com> | 2025-03-31 12:46:57 +0300 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2025-03-31 12:46:57 +0300 |
commit | ed709ad17833b630a02636295fd0939a193aa2cc (patch) | |
tree | 266438590ab6ddd6c6342cd21171e3c4a6238b95 /protocols/Teams/src/teams_endpoint.cpp | |
parent | 4747d2ed93f4f916c72d29a8dcd35425fcfea880 (diff) |
Teams: we don't need to enter login & password, since the authorization is handled by a browser
Diffstat (limited to 'protocols/Teams/src/teams_endpoint.cpp')
-rw-r--r-- | protocols/Teams/src/teams_endpoint.cpp | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/protocols/Teams/src/teams_endpoint.cpp b/protocols/Teams/src/teams_endpoint.cpp index 047e41c5dd..39b6958abb 100644 --- a/protocols/Teams/src/teams_endpoint.cpp +++ b/protocols/Teams/src/teams_endpoint.cpp @@ -29,6 +29,7 @@ void CTeamsProto::ProcessTimer() void CTeamsProto::SendCreateEndpoint() { auto *pReq = new AsyncHttpRequest(REQUEST_POST, HOST_DEFAULT, "/users/ME/endpoints", &CTeamsProto::OnEndpointCreated); + pReq->flags |= NLHRF_REDIRECT; pReq->m_szParam = "{\"endpointFeatures\":\"Agent,Presence2015,MessageProperties,CustomUserProperties,Casts,ModernBots,AutoIdleForWebApi,secureThreads,notificationStream,InviteFree,SupportsReadReceipts,ued\"}"; pReq->AddHeader("Origin", "https://web.skype.com"); pReq->AddHeader("Referer", "https://web.skype.com/"); @@ -54,16 +55,6 @@ void CTeamsProto::OnEndpointCreated(MHttpResponse *response, AsyncHttpRequest*) case 201: // okay, endpoint created break; - case 301: - case 302: // redirect to the closest data center - if (auto *hdr = response->FindHeader("Location")) { - CMStringA szUrl(hdr+8); - int iEnd = szUrl.Find('/'); - // g_plugin.szDefaultServer = (iEnd != -1) ? szUrl.Left(iEnd) : szUrl; - } - SendCreateEndpoint(); - return; - case 401: // unauthorized default: delSetting("TokenExpiresIn"); |