handle reconnect messages

This commit is contained in:
ouwou
2020-11-15 02:21:14 -05:00
parent db0833fe86
commit 266fb15c91
7 changed files with 94 additions and 10 deletions

View File

@@ -171,3 +171,11 @@ void to_json(nlohmann::json &j, const CreateDMObject &m) {
conv.push_back(std::to_string(id));
j["recipients"] = conv;
}
void to_json(nlohmann::json &j, const ResumeMessage &m) {
j["op"] = GatewayOp::Resume;
j["d"] = nlohmann::json::object();
j["d"]["token"] = m.Token;
j["d"]["session_id"] = m.SessionID;
j["d"]["seq"] = m.Sequence;
}