show status indicator in dm list, handle (some of) READY_SUPPLEMENTAL

This commit is contained in:
ouwou
2021-02-09 16:47:17 -05:00
parent 2ddac42575
commit aaef457526
6 changed files with 66 additions and 0 deletions

View File

@@ -62,6 +62,7 @@ enum class GatewayEvent : int {
INVITE_CREATE,
INVITE_DELETE,
USER_NOTE_UPDATE,
READY_SUPPLEMENTAL,
};
enum class GatewayCloseCode : uint16_t {
@@ -213,6 +214,27 @@ struct ReadyEventData {
friend void from_json(const nlohmann::json &j, ReadyEventData &m);
};
struct MergedPresence {
Snowflake UserID;
std::optional<uint64_t> LastModified;
PresenceData Presence;
friend void from_json(const nlohmann::json &j, MergedPresence &m);
};
struct SupplementalMergedPresencesData {
std::vector<std::vector<MergedPresence>> Guilds;
std::vector<MergedPresence> Friends;
friend void from_json(const nlohmann::json &j, SupplementalMergedPresencesData &m);
};
struct ReadySupplementalData {
SupplementalMergedPresencesData MergedPresences;
friend void from_json(const nlohmann::json &j, ReadySupplementalData &m);
};
struct IdentifyProperties {
std::string OS;
std::string Browser;