Make most MessageReaction methods private.

This commit is contained in:
levlam 2022-09-24 21:32:50 +03:00
parent 798f4fdb2f
commit 8ab43e5b9f

View File

@ -29,6 +29,10 @@ class Dependencies;
class Td; class Td;
class MessageReaction { class MessageReaction {
static constexpr int32 MAX_CHOOSE_COUNT = 2147483640;
static constexpr size_t MAX_RECENT_CHOOSERS = 3;
string reaction_; string reaction_;
int32 choose_count_ = 0; int32 choose_count_ = 0;
bool is_chosen_ = false; bool is_chosen_ = false;
@ -66,16 +70,6 @@ class MessageReaction {
void update_recent_chooser_dialog_ids(const MessageReaction &old_reaction); void update_recent_chooser_dialog_ids(const MessageReaction &old_reaction);
public:
static constexpr size_t MAX_RECENT_CHOOSERS = 3;
static constexpr int32 MAX_CHOOSE_COUNT = 2147483640;
MessageReaction() = default;
const string &get_reaction() const {
return reaction_;
}
int32 get_choose_count() const { int32 get_choose_count() const {
return choose_count_; return choose_count_;
} }
@ -91,6 +85,13 @@ class MessageReaction {
td_api::object_ptr<td_api::messageReaction> get_message_reaction_object(Td *td, UserId my_user_id, td_api::object_ptr<td_api::messageReaction> get_message_reaction_object(Td *td, UserId my_user_id,
UserId peer_user_id) const; UserId peer_user_id) const;
public:
MessageReaction() = default;
const string &get_reaction() const {
return reaction_;
}
template <class StorerT> template <class StorerT>
void store(StorerT &storer) const; void store(StorerT &storer) const;