aboutsummaryrefslogtreecommitdiffhomepage
path: root/td/telegram/MessageInputReplyTo.h
diff options
context:
space:
mode:
authorlevlam <levlam@telegram.org>2023-10-27 03:03:52 +0300
committerlevlam <levlam@telegram.org>2023-10-27 03:03:52 +0300
commita92b2fec1d88412999dfe6d5756185e5d01865a7 (patch)
treea1a504e8f9c2c93d1b2b4dc10594c923e5ab11ac /td/telegram/MessageInputReplyTo.h
parentadad6d69840f5c0bee2ce8b3c3d8520cde01bad5 (diff)
Make MessageInputReplyTo fields private.
Diffstat (limited to 'td/telegram/MessageInputReplyTo.h')
-rw-r--r--td/telegram/MessageInputReplyTo.h17
1 files changed, 16 insertions, 1 deletions
diff --git a/td/telegram/MessageInputReplyTo.h b/td/telegram/MessageInputReplyTo.h
index e9d8f49ff..e9d5d00bd 100644
--- a/td/telegram/MessageInputReplyTo.h
+++ b/td/telegram/MessageInputReplyTo.h
@@ -20,13 +20,18 @@ namespace td {
class Td;
-struct MessageInputReplyTo {
+class MessageInputReplyTo {
MessageId message_id_;
// or
StoryFullId story_full_id_;
friend bool operator==(const MessageInputReplyTo &lhs, const MessageInputReplyTo &rhs);
+ friend StringBuilder &operator<<(StringBuilder &string_builder, const MessageInputReplyTo &input_reply_to);
+
+ friend class RepliedMessageInfo;
+
+ public:
MessageInputReplyTo() = default;
explicit MessageInputReplyTo(MessageId message_id) : message_id_(message_id) {
@@ -45,11 +50,21 @@ struct MessageInputReplyTo {
return !is_empty();
}
+ bool is_same_chat_reply() const {
+ return message_id_.is_valid();
+ }
+
+ StoryFullId get_story_full_id() const {
+ return story_full_id_;
+ }
+
telegram_api::object_ptr<telegram_api::InputReplyTo> get_input_reply_to(Td *td,
MessageId top_thread_message_id) const;
td_api::object_ptr<td_api::InputMessageReplyTo> get_input_message_reply_to_object(Td *td, DialogId dialog_id) const;
+ MessageId get_same_chat_reply_to_message_id() const;
+
MessageFullId get_reply_message_full_id(DialogId owner_dialog_id) const;
template <class StorerT>