ocilo / skype-http

Unofficial Skype API for Node.js via HTTP
https://ocilo.github.io/skype-http
MIT License
51 stars 24 forks source link

Fix message host resolution #76

Closed demurgos closed 6 years ago

demurgos commented 6 years ago

See https://github.com/ocilo/skype-http/issues/73#issuecomment-357484675

codecov[bot] commented 6 years ago

Codecov Report

Merging #76 into master will not change coverage. The diff coverage is 0%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #76   +/-   ##
=======================================
  Coverage   44.96%   44.96%           
=======================================
  Files          67       67           
  Lines        1421     1421           
  Branches      130      130           
=======================================
  Hits          639      639           
  Misses        753      753           
  Partials       29       29
Impacted Files Coverage Δ
src/lib/helpers/register-endpoint.ts 22% <0%> (ø) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 10b98a7...518ea18. Read the comment docs.

demurgos commented 6 years ago

This change breaks the API on some of the test users. We can't just change the URL but need to properly handle multiple clouds.

I get the following response when acquiring the registration token:

{
  statusCode: 404,
  body: '{"errorCode":752,"message":"User is in a different cloud. See \'Location\' header for users current cloud."}',
  headers: {
    location: 'https://db4-client-s.gateway.messenger.live.com/v1/users/ME/endpoints',
    ...
  }
}