diff options
author | George Hazan <ghazan@miranda.im> | 2017-01-11 19:50:04 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2017-01-11 19:50:04 +0300 |
commit | e004a33b7853108b49f77ced20a460b3c8b78c35 (patch) | |
tree | 18bdffdf6db026cd108a337c1f15dcf89c351d9d /protocols/Discord/src/http.cpp | |
parent | 499aee4b2b43b2835a4fb13410cd195fb5a4311a (diff) |
Discord:
- API version is locked to v6;
- important fix for handling errors in http requests
Diffstat (limited to 'protocols/Discord/src/http.cpp')
-rw-r--r-- | protocols/Discord/src/http.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/protocols/Discord/src/http.cpp b/protocols/Discord/src/http.cpp index 90393ec6ef..a9136c5552 100644 --- a/protocols/Discord/src/http.cpp +++ b/protocols/Discord/src/http.cpp @@ -43,10 +43,14 @@ AsyncHttpRequest::AsyncHttpRequest(CDiscordProto *ppro, int iRequestType, LPCSTR cbSize = sizeof(NETLIBHTTPREQUEST); if (*_url == '/') { // relative url leads to a site - m_szUrl = "https://discordapp.com/api"; + m_szUrl = "https://discordapp.com/api/v6"; m_szUrl += _url; + m_bMainSite = true; + } + else { + m_szUrl = _url; + m_bMainSite = false; } - else m_szUrl = _url; flags = NLHRF_HTTP11 | NLHRF_REDIRECT | NLHRF_SSL; if (ppro->m_szAccessToken != NULL) { |