diff options
-rw-r--r-- | protocols/Discord/src/server.cpp | 7 |
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); } |