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/server.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/server.cpp')
-rw-r--r-- | protocols/Discord/src/server.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/protocols/Discord/src/server.cpp b/protocols/Discord/src/server.cpp index 270127a904..858be58c55 100644 --- a/protocols/Discord/src/server.cpp +++ b/protocols/Discord/src/server.cpp @@ -274,8 +274,9 @@ void CDiscordProto::OnReceiveMessageAck(NETLIBHTTPREQUEST *pReply, AsyncHttpRequ CMStringW wszToken(root["token"].as_mstring()); if (!wszToken.IsEmpty()) { JSONNode props; props.set_name("properties"); - root << CHAR_PARAM("event", "ack_messages") << props; - Push(new AsyncHttpRequest(this, REQUEST_POST, "/track", NULL, &root)); + JSONNode reply; reply << props; + reply << CHAR_PARAM("event", "ack_messages") << WCHAR_PARAM("token", root["token"].as_mstring()); + Push(new AsyncHttpRequest(this, REQUEST_POST, "/track", NULL, &reply)); } } |