summaryrefslogtreecommitdiff
path: root/protocols
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2017-02-01 19:44:33 +0300
committerGeorge Hazan <ghazan@miranda.im>2017-02-01 19:44:33 +0300
commita85c40a54d9036c98aed37071500df5926e74028 (patch)
tree1730f98bb769fbe2be1c13e27badc969299e869c /protocols
parente3917c5232297633df816d23abea42e3c27c1b69 (diff)
Discord: forgotten shit in UserInfo retrieving
Diffstat (limited to 'protocols')
-rw-r--r--protocols/Discord/src/server.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/protocols/Discord/src/server.cpp b/protocols/Discord/src/server.cpp
index afd8e7de0b..ecc43c6b07 100644
--- a/protocols/Discord/src/server.cpp
+++ b/protocols/Discord/src/server.cpp
@@ -116,7 +116,12 @@ void CDiscordProto::OnReceiveHistory(NETLIBHTTPREQUEST *pReply, AsyncHttpRequest
void CDiscordProto::RetrieveUserInfo(MCONTACT hContact)
{
- AsyncHttpRequest *pReq = new AsyncHttpRequest(this, REQUEST_GET, "/users/@me", &CDiscordProto::OnReceiveUserInfo);
+ CMStringA szUrl;
+ if (hContact == 0)
+ szUrl = "/users/@me";
+ else
+ szUrl.Format("/users/%lld", getId(hContact, DB_KEY_ID));
+ AsyncHttpRequest *pReq = new AsyncHttpRequest(this, REQUEST_GET, szUrl, &CDiscordProto::OnReceiveUserInfo);
pReq->pUserInfo = (void*)hContact;
Push(pReq);
}