2018-09-28 22:57:34 +02:00
|
|
|
//
|
2024-01-01 01:07:21 +01:00
|
|
|
// Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2024
|
2018-09-28 22:57:34 +02:00
|
|
|
//
|
|
|
|
// 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
|
|
|
|
|
2023-04-10 16:23:21 +02:00
|
|
|
#include "td/telegram/BackgroundInfo.h"
|
2023-10-30 17:04:14 +01:00
|
|
|
#include "td/telegram/ChannelId.h"
|
2018-09-28 22:57:34 +02:00
|
|
|
#include "td/telegram/DialogId.h"
|
2021-08-01 05:17:51 +02:00
|
|
|
#include "td/telegram/EncryptedFile.h"
|
2018-09-28 22:57:34 +02:00
|
|
|
#include "td/telegram/files/FileId.h"
|
2021-04-11 04:37:53 +02:00
|
|
|
#include "td/telegram/InputGroupCallId.h"
|
2018-09-28 22:57:34 +02:00
|
|
|
#include "td/telegram/logevent/LogEvent.h"
|
2020-01-27 14:06:00 +01:00
|
|
|
#include "td/telegram/MessageContentType.h"
|
2020-08-09 13:18:08 +02:00
|
|
|
#include "td/telegram/MessageCopyOptions.h"
|
2018-09-28 22:57:34 +02:00
|
|
|
#include "td/telegram/MessageEntity.h"
|
2023-09-21 18:11:17 +02:00
|
|
|
#include "td/telegram/MessageFullId.h"
|
2018-09-28 22:57:34 +02:00
|
|
|
#include "td/telegram/MessageId.h"
|
2024-01-30 13:07:21 +01:00
|
|
|
#include "td/telegram/MessageSelfDestructType.h"
|
2018-09-28 22:57:34 +02:00
|
|
|
#include "td/telegram/Photo.h"
|
2024-06-17 18:28:04 +02:00
|
|
|
#include "td/telegram/QuickReplyMessageFullId.h"
|
2018-09-28 22:57:34 +02:00
|
|
|
#include "td/telegram/ReplyMarkup.h"
|
2018-09-29 03:41:15 +02:00
|
|
|
#include "td/telegram/secret_api.h"
|
2020-01-27 02:54:01 +01:00
|
|
|
#include "td/telegram/SecretInputMedia.h"
|
2022-07-22 15:11:33 +02:00
|
|
|
#include "td/telegram/StickerType.h"
|
2023-07-01 15:22:01 +02:00
|
|
|
#include "td/telegram/StoryFullId.h"
|
2018-09-28 22:57:34 +02:00
|
|
|
#include "td/telegram/td_api.h"
|
|
|
|
#include "td/telegram/telegram_api.h"
|
2020-01-27 01:25:23 +01:00
|
|
|
#include "td/telegram/TopDialogCategory.h"
|
2018-09-28 22:57:34 +02:00
|
|
|
#include "td/telegram/UserId.h"
|
|
|
|
#include "td/telegram/WebPageId.h"
|
|
|
|
|
|
|
|
#include "td/utils/buffer.h"
|
|
|
|
#include "td/utils/common.h"
|
2022-06-27 12:30:18 +02:00
|
|
|
#include "td/utils/Promise.h"
|
2018-09-28 22:57:34 +02:00
|
|
|
#include "td/utils/Status.h"
|
|
|
|
|
2020-01-27 02:54:01 +01:00
|
|
|
#include <utility>
|
|
|
|
|
2018-09-28 22:57:34 +02:00
|
|
|
namespace td {
|
|
|
|
|
2022-03-11 13:10:24 +01:00
|
|
|
class Dependencies;
|
2018-09-28 22:57:34 +02:00
|
|
|
class Game;
|
2022-07-27 22:47:16 +02:00
|
|
|
class MultiPromiseActor;
|
2018-09-28 22:57:34 +02:00
|
|
|
struct Photo;
|
2023-10-26 21:53:25 +02:00
|
|
|
class RepliedMessageInfo;
|
2018-09-28 22:57:34 +02:00
|
|
|
class Td;
|
2023-08-01 17:11:30 +02:00
|
|
|
class Venue;
|
2018-09-28 22:57:34 +02:00
|
|
|
|
2023-10-26 17:50:16 +02:00
|
|
|
// Do not forget to update merge_message_contents and compare_message_contents when one of the inheritors of this class changes
|
2018-09-28 22:57:34 +02:00
|
|
|
class MessageContent {
|
|
|
|
public:
|
|
|
|
MessageContent() = default;
|
|
|
|
MessageContent(const MessageContent &) = default;
|
|
|
|
MessageContent &operator=(const MessageContent &) = default;
|
|
|
|
MessageContent(MessageContent &&) = default;
|
|
|
|
MessageContent &operator=(MessageContent &&) = default;
|
|
|
|
|
|
|
|
virtual MessageContentType get_type() const = 0;
|
|
|
|
virtual ~MessageContent() = default;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct InputMessageContent {
|
|
|
|
unique_ptr<MessageContent> content;
|
|
|
|
bool disable_web_page_preview = false;
|
2023-10-21 23:50:19 +02:00
|
|
|
bool invert_media = false;
|
2018-09-28 22:57:34 +02:00
|
|
|
bool clear_draft = false;
|
2024-01-30 13:07:21 +01:00
|
|
|
MessageSelfDestructType ttl;
|
2018-09-28 22:57:34 +02:00
|
|
|
UserId via_bot_user_id;
|
2020-12-19 12:31:42 +01:00
|
|
|
string emoji;
|
2018-09-28 22:57:34 +02:00
|
|
|
|
2023-10-21 23:50:19 +02:00
|
|
|
InputMessageContent(unique_ptr<MessageContent> &&content, bool disable_web_page_preview, bool invert_media,
|
2024-01-30 13:07:21 +01:00
|
|
|
bool clear_draft, MessageSelfDestructType ttl, UserId via_bot_user_id, string emoji)
|
2018-09-28 22:57:34 +02:00
|
|
|
: content(std::move(content))
|
|
|
|
, disable_web_page_preview(disable_web_page_preview)
|
2023-10-21 23:50:19 +02:00
|
|
|
, invert_media(invert_media)
|
2018-09-28 22:57:34 +02:00
|
|
|
, clear_draft(clear_draft)
|
|
|
|
, ttl(ttl)
|
2020-12-19 12:31:42 +01:00
|
|
|
, via_bot_user_id(via_bot_user_id)
|
|
|
|
, emoji(std::move(emoji)) {
|
2018-09-28 22:57:34 +02:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
struct InlineMessageContent {
|
|
|
|
unique_ptr<MessageContent> message_content;
|
|
|
|
unique_ptr<ReplyMarkup> message_reply_markup;
|
|
|
|
bool disable_web_page_preview;
|
2023-10-21 23:50:19 +02:00
|
|
|
bool invert_media;
|
2018-09-28 22:57:34 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
void store_message_content(const MessageContent *content, LogEventStorerCalcLength &storer);
|
|
|
|
|
|
|
|
void store_message_content(const MessageContent *content, LogEventStorerUnsafe &storer);
|
|
|
|
|
|
|
|
void parse_message_content(unique_ptr<MessageContent> &content, LogEventParser &parser);
|
|
|
|
|
|
|
|
InlineMessageContent create_inline_message_content(Td *td, FileId file_id,
|
2021-03-31 01:02:53 +02:00
|
|
|
tl_object_ptr<telegram_api::BotInlineMessage> &&bot_inline_message,
|
2018-09-28 22:57:34 +02:00
|
|
|
int32 allowed_media_content_id, Photo *photo, Game *game);
|
|
|
|
|
|
|
|
unique_ptr<MessageContent> create_text_message_content(string text, vector<MessageEntity> entities,
|
2023-10-16 15:47:22 +02:00
|
|
|
WebPageId web_page_id, bool force_small_media,
|
2023-10-19 12:03:27 +02:00
|
|
|
bool force_large_media, bool skip_confitmation,
|
|
|
|
string &&web_page_url);
|
2018-09-28 22:57:34 +02:00
|
|
|
|
|
|
|
unique_ptr<MessageContent> create_contact_registered_message_content();
|
|
|
|
|
|
|
|
unique_ptr<MessageContent> create_screenshot_taken_message_content();
|
|
|
|
|
2022-11-29 12:02:05 +01:00
|
|
|
unique_ptr<MessageContent> create_chat_set_ttl_message_content(int32 ttl, UserId from_user_id);
|
2018-09-28 22:57:34 +02:00
|
|
|
|
2024-05-15 16:33:56 +02:00
|
|
|
td_api::object_ptr<td_api::formattedText> extract_input_caption(
|
|
|
|
td_api::object_ptr<td_api::InputMessageContent> &input_message_content);
|
|
|
|
|
2024-05-15 17:04:42 +02:00
|
|
|
bool extract_input_invert_media(const td_api::object_ptr<td_api::InputMessageContent> &input_message_content);
|
|
|
|
|
2018-12-12 15:36:31 +01:00
|
|
|
Result<InputMessageContent> get_input_message_content(
|
2022-06-03 15:33:49 +02:00
|
|
|
DialogId dialog_id, tl_object_ptr<td_api::InputMessageContent> &&input_message_content, Td *td, bool is_premium);
|
2018-09-28 22:57:34 +02:00
|
|
|
|
2024-05-15 21:53:41 +02:00
|
|
|
Status check_message_group_message_contents(const vector<InputMessageContent> &message_contents);
|
|
|
|
|
2022-05-08 22:54:04 +02:00
|
|
|
bool can_have_input_media(const Td *td, const MessageContent *content, bool is_server);
|
2020-01-16 04:10:08 +01:00
|
|
|
|
2018-09-28 22:57:34 +02:00
|
|
|
SecretInputMedia get_secret_input_media(const MessageContent *content, Td *td,
|
|
|
|
tl_object_ptr<telegram_api::InputEncryptedFile> input_file,
|
2022-05-11 06:46:06 +02:00
|
|
|
BufferSlice thumbnail, int32 layer);
|
2018-09-28 22:57:34 +02:00
|
|
|
|
|
|
|
tl_object_ptr<telegram_api::InputMedia> get_input_media(const MessageContent *content, Td *td,
|
|
|
|
tl_object_ptr<telegram_api::InputFile> input_file,
|
|
|
|
tl_object_ptr<telegram_api::InputFile> input_thumbnail,
|
2024-01-30 13:07:21 +01:00
|
|
|
FileId file_id, FileId thumbnail_file_id,
|
|
|
|
MessageSelfDestructType ttl, const string &emoji, bool force);
|
2019-01-25 02:38:11 +01:00
|
|
|
|
2024-01-30 13:07:21 +01:00
|
|
|
tl_object_ptr<telegram_api::InputMedia> get_input_media(const MessageContent *content, Td *td,
|
|
|
|
MessageSelfDestructType ttl, const string &emoji, bool force);
|
2018-09-28 22:57:34 +02:00
|
|
|
|
2021-01-22 15:09:08 +01:00
|
|
|
tl_object_ptr<telegram_api::InputMedia> get_fake_input_media(Td *td, tl_object_ptr<telegram_api::InputFile> input_file,
|
|
|
|
FileId file_id);
|
|
|
|
|
2023-10-16 19:41:39 +02:00
|
|
|
tl_object_ptr<telegram_api::InputMedia> get_message_content_input_media_web_page(const Td *td,
|
|
|
|
const MessageContent *content);
|
|
|
|
|
2018-09-28 22:57:34 +02:00
|
|
|
void delete_message_content_thumbnail(MessageContent *content, Td *td);
|
|
|
|
|
2023-11-29 12:17:49 +01:00
|
|
|
Status can_send_message_content(DialogId dialog_id, const MessageContent *content, bool is_forward,
|
2023-12-02 20:19:48 +01:00
|
|
|
bool check_permissions, const Td *td);
|
2021-04-13 01:59:33 +02:00
|
|
|
|
2018-09-28 22:57:34 +02:00
|
|
|
bool can_forward_message_content(const MessageContent *content);
|
|
|
|
|
|
|
|
bool update_opened_message_content(MessageContent *content);
|
|
|
|
|
2020-10-19 13:31:18 +02:00
|
|
|
int32 get_message_content_index_mask(const MessageContent *content, const Td *td, bool is_outgoing);
|
2018-09-28 22:57:34 +02:00
|
|
|
|
2022-07-22 15:11:33 +02:00
|
|
|
StickerType get_message_content_sticker_type(const Td *td, const MessageContent *content);
|
|
|
|
|
2018-09-28 22:57:34 +02:00
|
|
|
MessageId get_message_content_pinned_message_id(const MessageContent *content);
|
|
|
|
|
2023-11-30 19:49:32 +01:00
|
|
|
BackgroundInfo get_message_content_my_background_info(const MessageContent *content, bool is_outgoing);
|
2023-04-10 16:23:21 +02:00
|
|
|
|
2021-08-23 17:47:32 +02:00
|
|
|
string get_message_content_theme_name(const MessageContent *content);
|
|
|
|
|
2023-09-21 18:11:17 +02:00
|
|
|
MessageFullId get_message_content_replied_message_id(DialogId dialog_id, const MessageContent *content);
|
2018-09-28 22:57:34 +02:00
|
|
|
|
2021-04-11 04:37:53 +02:00
|
|
|
std::pair<InputGroupCallId, bool> get_message_content_group_call_info(const MessageContent *content);
|
|
|
|
|
2023-06-13 16:14:19 +02:00
|
|
|
vector<UserId> get_message_content_min_user_ids(const Td *td, const MessageContent *message_content);
|
2023-04-12 00:33:48 +02:00
|
|
|
|
2023-10-26 23:34:33 +02:00
|
|
|
vector<ChannelId> get_message_content_min_channel_ids(const Td *td, const MessageContent *message_content);
|
|
|
|
|
2019-03-12 14:20:53 +01:00
|
|
|
vector<UserId> get_message_content_added_user_ids(const MessageContent *content);
|
|
|
|
|
2018-09-28 22:57:34 +02:00
|
|
|
UserId get_message_content_deleted_user_id(const MessageContent *content);
|
|
|
|
|
|
|
|
int32 get_message_content_live_location_period(const MessageContent *content);
|
|
|
|
|
2021-11-19 14:15:37 +01:00
|
|
|
bool get_message_content_poll_is_anonymous(const Td *td, const MessageContent *content);
|
|
|
|
|
2019-02-22 16:09:55 +01:00
|
|
|
bool get_message_content_poll_is_closed(const Td *td, const MessageContent *content);
|
|
|
|
|
2023-08-01 17:11:30 +02:00
|
|
|
const Venue *get_message_content_venue(const MessageContent *content);
|
|
|
|
|
2020-03-28 00:35:07 +01:00
|
|
|
bool has_message_content_web_page(const MessageContent *content);
|
2020-03-27 23:49:59 +01:00
|
|
|
|
2020-01-27 00:55:18 +01:00
|
|
|
void remove_message_content_web_page(MessageContent *content);
|
2018-09-28 22:57:34 +02:00
|
|
|
|
2021-07-26 03:50:08 +02:00
|
|
|
bool can_message_content_have_media_timestamp(const MessageContent *content);
|
|
|
|
|
2023-09-21 18:11:17 +02:00
|
|
|
void set_message_content_poll_answer(Td *td, const MessageContent *content, MessageFullId message_full_id,
|
2019-02-21 13:23:05 +01:00
|
|
|
vector<int32> &&option_ids, Promise<Unit> &&promise);
|
|
|
|
|
2023-09-21 18:11:17 +02:00
|
|
|
void get_message_content_poll_voters(Td *td, const MessageContent *content, MessageFullId message_full_id,
|
2020-01-18 05:01:05 +01:00
|
|
|
int32 option_id, int32 offset, int32 limit,
|
2023-04-25 15:41:04 +02:00
|
|
|
Promise<td_api::object_ptr<td_api::messageSenders>> &&promise);
|
2020-01-13 19:21:58 +01:00
|
|
|
|
2023-09-21 18:11:17 +02:00
|
|
|
void stop_message_content_poll(Td *td, const MessageContent *content, MessageFullId message_full_id,
|
2019-04-12 01:10:33 +02:00
|
|
|
unique_ptr<ReplyMarkup> &&reply_markup, Promise<Unit> &&promise);
|
2019-02-22 16:09:55 +01:00
|
|
|
|
2019-02-19 16:52:09 +01:00
|
|
|
void merge_message_contents(Td *td, const MessageContent *old_content, MessageContent *new_content,
|
2018-09-28 22:57:34 +02:00
|
|
|
bool need_message_changed_warning, DialogId dialog_id, bool need_merge_files,
|
|
|
|
bool &is_content_changed, bool &need_update);
|
|
|
|
|
|
|
|
bool merge_message_content_file_id(Td *td, MessageContent *message_content, FileId new_file_id);
|
|
|
|
|
2023-10-26 17:50:16 +02:00
|
|
|
void compare_message_contents(Td *td, const MessageContent *lhs_content, const MessageContent *rhs_content,
|
|
|
|
bool &is_content_changed, bool &need_update);
|
|
|
|
|
2023-09-21 18:11:17 +02:00
|
|
|
void register_message_content(Td *td, const MessageContent *content, MessageFullId message_full_id, const char *source);
|
2019-02-19 16:42:59 +01:00
|
|
|
|
2020-01-25 01:50:23 +01:00
|
|
|
void reregister_message_content(Td *td, const MessageContent *old_content, const MessageContent *new_content,
|
2023-09-21 18:11:17 +02:00
|
|
|
MessageFullId message_full_id, const char *source);
|
2020-01-25 01:50:23 +01:00
|
|
|
|
2023-09-21 18:11:17 +02:00
|
|
|
void unregister_message_content(Td *td, const MessageContent *content, MessageFullId message_full_id,
|
2020-02-22 17:21:58 +01:00
|
|
|
const char *source);
|
2019-02-19 16:42:59 +01:00
|
|
|
|
2023-11-06 18:37:17 +01:00
|
|
|
void register_reply_message_content(Td *td, const MessageContent *content);
|
|
|
|
|
|
|
|
void unregister_reply_message_content(Td *td, const MessageContent *content);
|
|
|
|
|
2024-06-17 18:28:04 +02:00
|
|
|
void register_quick_reply_message_content(Td *td, const MessageContent *content,
|
|
|
|
QuickReplyMessageFullId message_full_id, const char *source);
|
|
|
|
|
|
|
|
void unregister_quick_reply_message_content(Td *td, const MessageContent *content,
|
|
|
|
QuickReplyMessageFullId message_full_id, const char *source);
|
|
|
|
|
2018-09-28 22:57:34 +02:00
|
|
|
unique_ptr<MessageContent> get_secret_message_content(
|
2021-08-01 05:17:51 +02:00
|
|
|
Td *td, string message_text, unique_ptr<EncryptedFile> file,
|
2022-07-01 14:04:11 +02:00
|
|
|
tl_object_ptr<secret_api::DecryptedMessageMedia> &&media_ptr,
|
2018-09-28 22:57:34 +02:00
|
|
|
vector<tl_object_ptr<secret_api::MessageEntity>> &&secret_entities, DialogId owner_dialog_id,
|
2022-06-03 16:31:48 +02:00
|
|
|
MultiPromiseActor &load_data_multipromise, bool is_premium);
|
2018-09-28 22:57:34 +02:00
|
|
|
|
|
|
|
unique_ptr<MessageContent> get_message_content(Td *td, FormattedText message_text,
|
2022-07-01 14:04:11 +02:00
|
|
|
tl_object_ptr<telegram_api::MessageMedia> &&media_ptr,
|
2023-11-30 19:11:19 +01:00
|
|
|
DialogId owner_dialog_id, int32 message_date, bool is_content_read,
|
2024-01-30 13:07:21 +01:00
|
|
|
UserId via_bot_user_id, MessageSelfDestructType *ttl,
|
|
|
|
bool *disable_web_page_preview, const char *source);
|
2018-09-28 22:57:34 +02:00
|
|
|
|
2023-10-14 01:49:50 +02:00
|
|
|
enum class MessageContentDupType : int32 {
|
|
|
|
Send, // normal message sending
|
|
|
|
SendViaBot, // message sending via bot
|
|
|
|
Forward, // server-side message forward
|
|
|
|
Copy, // local message copy
|
|
|
|
ServerCopy // server-side message copy
|
|
|
|
};
|
2020-01-15 00:11:26 +01:00
|
|
|
|
2018-09-28 22:57:34 +02:00
|
|
|
unique_ptr<MessageContent> dup_message_content(Td *td, DialogId dialog_id, const MessageContent *content,
|
2020-08-09 13:18:08 +02:00
|
|
|
MessageContentDupType type, MessageCopyOptions &©_options);
|
2018-09-28 22:57:34 +02:00
|
|
|
|
2022-07-01 14:04:11 +02:00
|
|
|
unique_ptr<MessageContent> get_action_message_content(Td *td, tl_object_ptr<telegram_api::MessageAction> &&action_ptr,
|
2023-11-30 19:11:19 +01:00
|
|
|
DialogId owner_dialog_id, int32 message_date,
|
2024-06-19 13:43:05 +02:00
|
|
|
const RepliedMessageInfo &replied_message_info,
|
|
|
|
bool is_business_message);
|
2018-09-28 22:57:34 +02:00
|
|
|
|
|
|
|
tl_object_ptr<td_api::MessageContent> get_message_content_object(const MessageContent *content, Td *td,
|
2021-03-31 14:36:25 +02:00
|
|
|
DialogId dialog_id, int32 message_date,
|
2021-08-04 08:28:53 +02:00
|
|
|
bool is_content_secret, bool skip_bot_commands,
|
2023-11-01 19:55:12 +01:00
|
|
|
int32 max_media_timestamp, bool invert_media,
|
|
|
|
bool disable_web_page_preview);
|
2018-09-28 22:57:34 +02:00
|
|
|
|
2021-08-09 18:37:47 +02:00
|
|
|
FormattedText *get_message_content_text_mutable(MessageContent *content);
|
|
|
|
|
2018-09-28 22:57:34 +02:00
|
|
|
const FormattedText *get_message_content_text(const MessageContent *content);
|
|
|
|
|
|
|
|
const FormattedText *get_message_content_caption(const MessageContent *content);
|
|
|
|
|
2022-12-30 00:39:31 +01:00
|
|
|
bool get_message_content_has_spoiler(const MessageContent *content);
|
|
|
|
|
|
|
|
void set_message_content_has_spoiler(MessageContent *content, bool has_spoiler);
|
|
|
|
|
2018-09-28 22:57:34 +02:00
|
|
|
int32 get_message_content_duration(const MessageContent *content, const Td *td);
|
|
|
|
|
2021-08-05 01:09:04 +02:00
|
|
|
int32 get_message_content_media_duration(const MessageContent *content, const Td *td);
|
|
|
|
|
2022-09-23 15:16:56 +02:00
|
|
|
const Photo *get_message_content_photo(const MessageContent *content);
|
|
|
|
|
2019-08-09 16:41:26 +02:00
|
|
|
FileId get_message_content_upload_file_id(const MessageContent *content);
|
|
|
|
|
|
|
|
FileId get_message_content_any_file_id(const MessageContent *content);
|
2018-09-28 22:57:34 +02:00
|
|
|
|
|
|
|
void update_message_content_file_id_remote(MessageContent *content, FileId file_id);
|
|
|
|
|
|
|
|
FileId get_message_content_thumbnail_file_id(const MessageContent *content, const Td *td);
|
|
|
|
|
|
|
|
vector<FileId> get_message_content_file_ids(const MessageContent *content, const Td *td);
|
|
|
|
|
2023-06-22 21:39:47 +02:00
|
|
|
StoryFullId get_message_content_story_full_id(const Td *td, const MessageContent *content);
|
|
|
|
|
2018-09-28 22:57:34 +02:00
|
|
|
string get_message_content_search_text(const Td *td, const MessageContent *content);
|
|
|
|
|
2024-06-19 17:18:27 +02:00
|
|
|
bool update_message_content_extended_media(
|
|
|
|
MessageContent *content, vector<telegram_api::object_ptr<telegram_api::MessageExtendedMedia>> extended_media,
|
|
|
|
DialogId owner_dialog_id, Td *td);
|
2022-09-23 11:07:07 +02:00
|
|
|
|
2022-09-24 21:17:17 +02:00
|
|
|
bool need_poll_message_content_extended_media(const MessageContent *content);
|
|
|
|
|
2023-09-21 18:11:17 +02:00
|
|
|
void get_message_content_animated_emoji_click_sticker(const MessageContent *content, MessageFullId message_full_id,
|
2021-09-15 23:41:40 +02:00
|
|
|
Td *td, Promise<td_api::object_ptr<td_api::sticker>> &&promise);
|
|
|
|
|
2023-09-21 18:11:17 +02:00
|
|
|
void on_message_content_animated_emoji_clicked(const MessageContent *content, MessageFullId message_full_id, Td *td,
|
2022-05-12 17:02:27 +02:00
|
|
|
string &&emoji, string &&data);
|
2021-09-17 14:51:42 +02:00
|
|
|
|
2018-12-25 18:47:37 +01:00
|
|
|
bool need_reget_message_content(const MessageContent *content);
|
|
|
|
|
2019-01-08 19:24:06 +01:00
|
|
|
bool need_delay_message_content_notification(const MessageContent *content, UserId my_user_id);
|
|
|
|
|
2018-09-28 22:57:34 +02:00
|
|
|
void update_expired_message_content(unique_ptr<MessageContent> &content);
|
|
|
|
|
2019-02-19 15:06:48 +01:00
|
|
|
void update_failed_to_send_message_content(Td *td, unique_ptr<MessageContent> &content);
|
|
|
|
|
2023-01-10 14:20:30 +01:00
|
|
|
void add_message_content_dependencies(Dependencies &dependencies, const MessageContent *message_content, bool is_bot);
|
2018-12-12 14:11:49 +01:00
|
|
|
|
2022-10-27 18:03:58 +02:00
|
|
|
void update_forum_topic_info_by_service_message_content(Td *td, const MessageContent *content, DialogId dialog_id,
|
|
|
|
MessageId top_thread_message_id);
|
|
|
|
|
2018-12-12 13:57:24 +01:00
|
|
|
void on_sent_message_content(Td *td, const MessageContent *content);
|
|
|
|
|
2022-09-04 20:35:11 +02:00
|
|
|
void move_message_content_sticker_set_to_top(Td *td, const MessageContent *content);
|
|
|
|
|
2020-01-27 01:25:23 +01:00
|
|
|
void on_dialog_used(TopDialogCategory category, DialogId dialog_id, int32 date);
|
|
|
|
|
2020-01-27 01:34:23 +01:00
|
|
|
void update_used_hashtags(Td *td, const MessageContent *content);
|
|
|
|
|
2018-09-28 22:57:34 +02:00
|
|
|
} // namespace td
|