summaryrefslogtreecommitdiff
path: root/src/discord/objects.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/discord/objects.hpp')
-rw-r--r--src/discord/objects.hpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/discord/objects.hpp b/src/discord/objects.hpp
index 9db9369..97da807 100644
--- a/src/discord/objects.hpp
+++ b/src/discord/objects.hpp
@@ -272,10 +272,16 @@ struct ReadStateData {
friend void from_json(const nlohmann::json &j, ReadStateData &m);
};
+enum class NotificationLevel {
+ ALL_MESSAGES = 0,
+ ONLY_MENTIONS = 1,
+ NO_MESSAGES = 2,
+};
+
struct UserGuildSettingsChannelOverride {
bool Muted;
MuteConfigData MuteConfig;
- int MessageNotifications;
+ NotificationLevel MessageNotifications;
bool Collapsed;
Snowflake ChannelID;
@@ -290,13 +296,15 @@ struct UserGuildSettingsEntry {
bool Muted;
MuteConfigData MuteConfig;
bool MobilePush;
- int MessageNotifications;
+ NotificationLevel MessageNotifications;
bool HideMutedChannels;
Snowflake GuildID;
std::vector<UserGuildSettingsChannelOverride> ChannelOverrides;
friend void from_json(const nlohmann::json &j, UserGuildSettingsEntry &m);
friend void to_json(nlohmann::json &j, const UserGuildSettingsEntry &m);
+
+ std::optional<UserGuildSettingsChannelOverride> GetOverride(Snowflake channel_id) const;
};
struct UserGuildSettingsData {