diff options
author | George Hazan <ghazan@miranda.im> | 2019-12-27 22:51:52 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2019-12-27 22:51:52 +0300 |
commit | 8bc24cb41ad6db6fc56731c9dffcb765cbd9a79f (patch) | |
tree | 6403195285ecb7beae3a8547d65932257803cdc9 /protocols/Discord | |
parent | 42b48e4121e22cea97a9d4fc4c671b59004c77b9 (diff) |
Facebook: sending messages
Diffstat (limited to 'protocols/Discord')
-rw-r--r-- | protocols/Discord/src/proto.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/protocols/Discord/src/proto.cpp b/protocols/Discord/src/proto.cpp index c6ffdba35e..dc13c2fccc 100644 --- a/protocols/Discord/src/proto.cpp +++ b/protocols/Discord/src/proto.cpp @@ -407,7 +407,7 @@ int CDiscordProto::SendMsg(MCONTACT hContact, int /*flags*/, const char *pszSrc) // we generate a random 64-bit integer and pass it to the server // to distinguish our own messages from these generated by another clients SnowFlake nonce; Utils_GetRandom(&nonce, sizeof(nonce)); - JSONNode body; body << WCHAR_PARAM("content", wszText) << INT64_PARAM("nonce", nonce); + JSONNode body; body << WCHAR_PARAM("content", wszText) << INT64_PARAM("nonce", abs(nonce)); CMStringA szUrl(FORMAT, "/channels/%lld/messages", pUser->channelId); AsyncHttpRequest *pReq = new AsyncHttpRequest(this, REQUEST_POST, szUrl, nullptr, &body); |