diff options
| author | levlam <levlam@telegram.org> | 2024-07-26 15:11:41 +0300 |
|---|---|---|
| committer | levlam <levlam@telegram.org> | 2024-07-26 15:11:41 +0300 |
| commit | 1438e1bd8886ef8c69a4fdd700924b8a55599f4e (patch) | |
| tree | 3c514a0e86eaa86557be00495465a83b6c5b532d /td/telegram/ReactionManager.cpp | |
| parent | 3ba783158f8c584d228d47eaf83314e6d9721c0f (diff) | |
Add td_api::reactionTypePaid.
Diffstat (limited to 'td/telegram/ReactionManager.cpp')
| -rw-r--r-- | td/telegram/ReactionManager.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/td/telegram/ReactionManager.cpp b/td/telegram/ReactionManager.cpp index 0c9e31f37..0d2fc46e7 100644 --- a/td/telegram/ReactionManager.cpp +++ b/td/telegram/ReactionManager.cpp @@ -964,8 +964,11 @@ void ReactionManager::set_default_reaction(ReactionType reaction_type, Promise<U if (reaction_type.is_empty()) { return promise.set_error(Status::Error(400, "Default reaction must be non-empty")); } + if (reaction_type.is_paid_reaction()) { + return promise.set_error(Status::Error(400, "Can't set paid reaction as default")); + } if (!reaction_type.is_custom_reaction() && !is_active_reaction(reaction_type)) { - return promise.set_error(Status::Error(400, "Can't set incative reaction as default")); + return promise.set_error(Status::Error(400, "Can't set inactive reaction as default")); } if (td_->option_manager_->get_option_string("default_reaction", "-") != reaction_type.get_string()) { |
