summaryrefslogtreecommitdiff
path: root/protocols/Discord/src/proto.h
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2017-02-22 13:29:14 +0300
committerGeorge Hazan <ghazan@miranda.im>2017-02-22 13:29:14 +0300
commite940fb548345fb5e926a0d87f8024257c692726d (patch)
tree4c28cece4d305f9ca34ae56f6edf96b0e57c5e1b /protocols/Discord/src/proto.h
parent87b6b08235a1999ed3734c78af11f4b325b07663 (diff)
Discord: a rusty crutch to receive updates for sent messages
Diffstat (limited to 'protocols/Discord/src/proto.h')
-rw-r--r--protocols/Discord/src/proto.h19
1 files changed, 15 insertions, 4 deletions
diff --git a/protocols/Discord/src/proto.h b/protocols/Discord/src/proto.h
index fbe1b9d2b3..9ab553e5a4 100644
--- a/protocols/Discord/src/proto.h
+++ b/protocols/Discord/src/proto.h
@@ -92,6 +92,18 @@ struct CDiscordRole : public MZeroedObject
/////////////////////////////////////////////////////////////////////////////////////////
+struct CDiscordMessage
+{
+ SnowFlake id, authorId;
+
+ CDiscordMessage(SnowFlake _id = 0, SnowFlake _authorId = 0) :
+ id(_id),
+ authorId(_authorId)
+ {}
+};
+
+/////////////////////////////////////////////////////////////////////////////////////////
+
enum CDiscordHistoryOp
{
MSG_NOFILTER, MSG_AFTER, MSG_BEFORE
@@ -108,9 +120,11 @@ struct CDiscordUser : public MZeroedObject
SnowFlake guildId;
SnowFlake channelId;
- SnowFlake lastMessageId, lastReadId;
+ SnowFlake lastReadId;
bool bIsPrivate;
+ CDiscordMessage lastMsg;
+
CMStringW wszUsername;
int iDiscriminator;
};
@@ -303,11 +317,8 @@ public:
void OnReceiveCreateChannel(NETLIBHTTPREQUEST*, AsyncHttpRequest*);
void OnReceiveAuth(NETLIBHTTPREQUEST*, AsyncHttpRequest*);
- void OnReceiveChannels(NETLIBHTTPREQUEST*, AsyncHttpRequest*);
void OnReceiveFile(NETLIBHTTPREQUEST*, AsyncHttpRequest*);
- void OnReceiveFriends(NETLIBHTTPREQUEST*, AsyncHttpRequest*);
void OnReceiveGateway(NETLIBHTTPREQUEST*, AsyncHttpRequest*);
- void OnReceiveGuilds(NETLIBHTTPREQUEST*, AsyncHttpRequest*);
void OnReceiveMessage(NETLIBHTTPREQUEST*, AsyncHttpRequest*);
void OnReceiveMessageAck(NETLIBHTTPREQUEST*, AsyncHttpRequest*);
void OnReceiveToken(NETLIBHTTPREQUEST*, AsyncHttpRequest*);