diff options
author | ouwou <26526779+ouwou@users.noreply.github.com> | 2021-12-18 01:58:29 -0500 |
---|---|---|
committer | ouwou <26526779+ouwou@users.noreply.github.com> | 2021-12-18 01:58:29 -0500 |
commit | f580535d3570de59125cc377b01188601c82b5b9 (patch) | |
tree | 01a6d40ac08fde25e0e0705e8088c26f76cb6f12 /src/discord/objects.hpp | |
parent | 1d7529e60925c36af5aa5a8702e7a0827e646f00 (diff) | |
download | abaddon-portaudio-f580535d3570de59125cc377b01188601c82b5b9.tar.gz abaddon-portaudio-f580535d3570de59125cc377b01188601c82b5b9.zip |
add mute/unmute channel menu item
Diffstat (limited to 'src/discord/objects.hpp')
-rw-r--r-- | src/discord/objects.hpp | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/src/discord/objects.hpp b/src/discord/objects.hpp index 69ad422..c72361b 100644 --- a/src/discord/objects.hpp +++ b/src/discord/objects.hpp @@ -244,14 +244,23 @@ struct ReadStateData { friend void from_json(const nlohmann::json &j, ReadStateData &m); }; +struct MuteConfigData { + std::optional<std::string> EndTime; // nullopt is encoded as null + int SelectedTimeWindow; + + friend void from_json(const nlohmann::json &j, MuteConfigData &m); + friend void to_json(nlohmann::json &j, const MuteConfigData &m); +}; + struct UserGuildSettingsChannelOverride { bool Muted; - // MuteConfig + MuteConfigData MuteConfig; int MessageNotifications; bool Collapsed; Snowflake ChannelID; friend void from_json(const nlohmann::json &j, UserGuildSettingsChannelOverride &m); + friend void to_json(nlohmann::json &j, const UserGuildSettingsChannelOverride &m); }; struct UserGuildSettingsEntry { @@ -259,7 +268,7 @@ struct UserGuildSettingsEntry { bool SuppressRoles; bool SuppressEveryone; bool Muted; - // MuteConfig + MuteConfigData MuteConfig; bool MobilePush; int MessageNotifications; bool HideMutedChannels; @@ -267,11 +276,12 @@ struct UserGuildSettingsEntry { std::vector<UserGuildSettingsChannelOverride> ChannelOverrides; friend void from_json(const nlohmann::json &j, UserGuildSettingsEntry &m); + friend void to_json(nlohmann::json &j, const UserGuildSettingsEntry &m); }; struct UserGuildSettingsData { int Version; - bool IsParital; + bool IsPartial; std::vector<UserGuildSettingsEntry> Entries; friend void from_json(const nlohmann::json &j, UserGuildSettingsData &m); |