mirror of
https://github.com/uowuo/abaddon.git
synced 2024-11-10 14:10:10 +00:00
send sequences in heartbeat like we should
This commit is contained in:
parent
4ac27e9140
commit
7965b788b1
@ -412,6 +412,9 @@ void DiscordClient::HandleGatewayMessage(std::string str) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (m.Sequence != -1)
|
||||
m_last_sequence = m.Sequence;
|
||||
|
||||
try {
|
||||
switch (m.Opcode) {
|
||||
case GatewayOp::Hello: {
|
||||
|
@ -5,6 +5,7 @@ void from_json(const nlohmann::json &j, GatewayMessage &m) {
|
||||
m.Data = j.at("d");
|
||||
|
||||
JS_ON("t", m.Type);
|
||||
JS_ON("s", m.Sequence);
|
||||
}
|
||||
|
||||
void from_json(const nlohmann::json &j, HelloMessageData &m) {
|
||||
|
@ -39,6 +39,7 @@ struct GatewayMessage {
|
||||
GatewayOp Opcode;
|
||||
nlohmann::json Data;
|
||||
std::string Type;
|
||||
int Sequence = -1;
|
||||
|
||||
friend void from_json(const nlohmann::json &j, GatewayMessage &m);
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user