summaryrefslogtreecommitdiff
path: root/protocols/Discord/src/server.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2017-01-17 20:57:02 +0300
committerGeorge Hazan <ghazan@miranda.im>2017-01-17 20:57:02 +0300
commitad61413a521ea9cebd849b659653a21c2c33ff8a (patch)
tree9029a623fbbe1491f86a68cbaa92b6b45c786521 /protocols/Discord/src/server.cpp
parentb327ed7872ca83c3a4249039ba1a3d8dd3ece630 (diff)
Discord: auth support
Diffstat (limited to 'protocols/Discord/src/server.cpp')
-rw-r--r--protocols/Discord/src/server.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/protocols/Discord/src/server.cpp b/protocols/Discord/src/server.cpp
index 58742a63d4..ee4aa23204 100644
--- a/protocols/Discord/src/server.cpp
+++ b/protocols/Discord/src/server.cpp
@@ -18,6 +18,14 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "stdafx.h"
/////////////////////////////////////////////////////////////////////////////////////////
+// removes a friend from the server
+
+void CDiscordProto::RemoveFriend(SnowFlake id)
+{
+ Push(new AsyncHttpRequest(this, REQUEST_DELETE, CMStringA(FORMAT, "/users/@me/relationships/%lld", id), NULL));
+}
+
+/////////////////////////////////////////////////////////////////////////////////////////
// retrieves server history
void CDiscordProto::RetrieveHistory(MCONTACT hContact, CDiscordHitoryOp iOp, SnowFlake msgid, int iLimit)
@@ -51,7 +59,6 @@ void CDiscordProto::OnReceiveHistory(NETLIBHTTPREQUEST *pReply, AsyncHttpRequest
return;
DBEVENTINFO dbei = {};
- dbei.cbSize = sizeof(dbei);
dbei.szModule = m_szModuleName;
dbei.flags = DBEF_READ | DBEF_UTF;
dbei.eventType = EVENTTYPE_MESSAGE;