diff options
| author | levlam <levlam@telegram.org> | 2022-10-19 18:30:25 +0300 |
|---|---|---|
| committer | levlam <levlam@telegram.org> | 2022-10-19 18:30:25 +0300 |
| commit | 02ed5e4f1eef686a6ed6302c120bb436915d37d7 (patch) | |
| tree | 434ed813c382e9bc39ebe2f70de51ac7bc7b9d43 /td/telegram/VideoNotesManager.h | |
| parent | ea12905dd2ffd4d284b5d12b95c79ea2a92bafdc (diff) | |
Register video note messages.
Diffstat (limited to 'td/telegram/VideoNotesManager.h')
| -rw-r--r-- | td/telegram/VideoNotesManager.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/td/telegram/VideoNotesManager.h b/td/telegram/VideoNotesManager.h index f03a4b5d7..a69596aa4 100644 --- a/td/telegram/VideoNotesManager.h +++ b/td/telegram/VideoNotesManager.h @@ -8,6 +8,7 @@ #include "td/telegram/Dimensions.h" #include "td/telegram/files/FileId.h" +#include "td/telegram/FullMessageId.h" #include "td/telegram/PhotoSize.h" #include "td/telegram/SecretInputMedia.h" #include "td/telegram/td_api.h" @@ -15,6 +16,7 @@ #include "td/utils/buffer.h" #include "td/utils/common.h" +#include "td/utils/FlatHashSet.h" #include "td/utils/WaitFreeHashMap.h" namespace td { @@ -37,6 +39,10 @@ class VideoNotesManager { void create_video_note(FileId file_id, string minithumbnail, PhotoSize thumbnail, int32 duration, Dimensions dimensions, bool replace); + void register_video_note(FileId video_note_file_id, FullMessageId full_message_id, const char *source); + + void unregister_video_note(FileId video_note_file_id, FullMessageId full_message_id, const char *source); + tl_object_ptr<telegram_api::InputMedia> get_input_media(FileId file_id, tl_object_ptr<telegram_api::InputFile> input_file, tl_object_ptr<telegram_api::InputFile> input_thumbnail) const; @@ -76,6 +82,9 @@ class VideoNotesManager { Td *td_; WaitFreeHashMap<FileId, unique_ptr<VideoNote>, FileIdHash> video_notes_; + + FlatHashMap<FileId, FlatHashSet<FullMessageId, FullMessageIdHash>, FileIdHash> video_note_messages_; + FlatHashMap<FullMessageId, FileId, FullMessageIdHash> message_video_notes_; }; } // namespace td |
