// // Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2024 // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #pragma once #include "td/telegram/NotificationSound.h" #include "td/telegram/ReactionNotificationsFrom.h" #include "td/telegram/td_api.h" #include "td/telegram/telegram_api.h" #include "td/utils/common.h" #include "td/utils/Status.h" #include "td/utils/StringBuilder.h" namespace td { class ReactionNotificationSettings { ReactionNotificationsFrom message_reactions_; ReactionNotificationsFrom story_reactions_; unique_ptr sound_; bool show_preview_ = true; friend bool operator==(const ReactionNotificationSettings &lhs, const ReactionNotificationSettings &rhs); friend StringBuilder &operator<<(StringBuilder &string_builder, const ReactionNotificationSettings ¬ification_settings); public: ReactionNotificationSettings() = default; explicit ReactionNotificationSettings( td_api::object_ptr &¬ification_settings); explicit ReactionNotificationSettings( telegram_api::object_ptr &¬ify_settings); td_api::object_ptr get_reaction_notification_settings_object() const; telegram_api::object_ptr get_input_reactions_notify_settings() const; void update_default_notification_sound(const ReactionNotificationSettings &other); template void store(StorerT &storer) const; template void parse(ParserT &parser); }; bool operator==(const ReactionNotificationSettings &lhs, const ReactionNotificationSettings &rhs); inline bool operator!=(const ReactionNotificationSettings &lhs, const ReactionNotificationSettings &rhs) { return !(lhs == rhs); } StringBuilder &operator<<(StringBuilder &string_builder, const ReactionNotificationSettings ¬ification_settings); } // namespace td