diff --git a/td/generate/scheme/td_api.tl b/td/generate/scheme/td_api.tl index 2cdd94d56..6da09c7fa 100644 --- a/td/generate/scheme/td_api.tl +++ b/td/generate/scheme/td_api.tl @@ -5052,7 +5052,7 @@ setChatTitle chat_id:int53 title:string = Ok; setChatPhoto chat_id:int53 photo:InputChatPhoto = Ok; //@description Changes the message TTL in a chat. Requires can_delete_messages administrator right in basic groups, supergroups and channels -//-Message TTL can't be changed in a chat with the current user (Saved Messages) and the chat 777000 (Telegram) +//-Message TTL can't be changed in a chat with the current user (Saved Messages) and the chat 777000 (Telegram). //@chat_id Chat identifier @ttl New TTL value, in seconds; unless the chat is secret, it must be from 0 up to 365 * 86400 and be divisible by 86400 setChatMessageTtl chat_id:int53 ttl:int32 = Ok; diff --git a/td/telegram/AnimationsManager.cpp b/td/telegram/AnimationsManager.cpp index e4d2dc201..e5893f130 100644 --- a/td/telegram/AnimationsManager.cpp +++ b/td/telegram/AnimationsManager.cpp @@ -17,6 +17,7 @@ #include "td/telegram/Global.h" #include "td/telegram/logevent/LogEvent.h" #include "td/telegram/misc.h" +#include "td/telegram/PhotoFormat.h" #include "td/telegram/secret_api.h" #include "td/telegram/Td.h" #include "td/telegram/td_api.h" diff --git a/td/telegram/AudiosManager.cpp b/td/telegram/AudiosManager.cpp index 902c5ef8a..8baaef701 100644 --- a/td/telegram/AudiosManager.cpp +++ b/td/telegram/AudiosManager.cpp @@ -8,6 +8,7 @@ #include "td/telegram/AuthManager.h" #include "td/telegram/files/FileManager.h" +#include "td/telegram/PhotoFormat.h" #include "td/telegram/secret_api.h" #include "td/telegram/Td.h" diff --git a/td/telegram/BackgroundManager.cpp b/td/telegram/BackgroundManager.cpp index 1f96233db..96badfb15 100644 --- a/td/telegram/BackgroundManager.cpp +++ b/td/telegram/BackgroundManager.cpp @@ -17,7 +17,7 @@ #include "td/telegram/files/FileManager.h" #include "td/telegram/files/FileType.h" #include "td/telegram/Global.h" -#include "td/telegram/Photo.h" +#include "td/telegram/PhotoFormat.h" #include "td/telegram/Td.h" #include "td/telegram/TdDb.h" #include "td/telegram/TdParameters.h" diff --git a/td/telegram/BackgroundManager.h b/td/telegram/BackgroundManager.h index b484a4dac..ab360e8bc 100644 --- a/td/telegram/BackgroundManager.h +++ b/td/telegram/BackgroundManager.h @@ -11,7 +11,6 @@ #include "td/telegram/files/FileId.h" #include "td/telegram/files/FileSourceId.h" #include "td/telegram/logevent/LogEvent.h" -#include "td/telegram/Photo.h" #include "td/telegram/td_api.h" #include "td/telegram/telegram_api.h" diff --git a/td/telegram/DocumentsManager.cpp b/td/telegram/DocumentsManager.cpp index e2f1358a0..f871aa370 100644 --- a/td/telegram/DocumentsManager.cpp +++ b/td/telegram/DocumentsManager.cpp @@ -16,7 +16,6 @@ #include "td/telegram/files/FileType.h" #include "td/telegram/misc.h" #include "td/telegram/net/DcId.h" -#include "td/telegram/Photo.h" #include "td/telegram/PhotoSizeSource.h" #include "td/telegram/secret_api.h" #include "td/telegram/StickerFormat.h" diff --git a/td/telegram/DocumentsManager.h b/td/telegram/DocumentsManager.h index e711835df..c6e139871 100644 --- a/td/telegram/DocumentsManager.h +++ b/td/telegram/DocumentsManager.h @@ -11,6 +11,7 @@ #include "td/telegram/EncryptedFile.h" #include "td/telegram/files/FileId.h" #include "td/telegram/Photo.h" +#include "td/telegram/PhotoFormat.h" #include "td/telegram/secret_api.h" #include "td/telegram/SecretInputMedia.h" #include "td/telegram/td_api.h" diff --git a/td/telegram/InlineQueriesManager.cpp b/td/telegram/InlineQueriesManager.cpp index ba3822b9f..b98926a60 100644 --- a/td/telegram/InlineQueriesManager.cpp +++ b/td/telegram/InlineQueriesManager.cpp @@ -28,6 +28,7 @@ #include "td/telegram/net/DcId.h" #include "td/telegram/Payments.h" #include "td/telegram/Photo.h" +#include "td/telegram/PhotoFormat.h" #include "td/telegram/ReplyMarkup.h" #include "td/telegram/StickersManager.h" #include "td/telegram/Td.h" diff --git a/td/telegram/MessageContent.cpp b/td/telegram/MessageContent.cpp index 1f23e2dc3..f7c1f28ae 100644 --- a/td/telegram/MessageContent.cpp +++ b/td/telegram/MessageContent.cpp @@ -46,6 +46,7 @@ #include "td/telegram/Payments.hpp" #include "td/telegram/Photo.h" #include "td/telegram/Photo.hpp" +#include "td/telegram/PhotoFormat.h" #include "td/telegram/PhotoSizeSource.h" #include "td/telegram/PollId.h" #include "td/telegram/PollId.hpp" diff --git a/td/telegram/NotificationType.cpp b/td/telegram/NotificationType.cpp index 90b1e30ef..c4d0b310f 100644 --- a/td/telegram/NotificationType.cpp +++ b/td/telegram/NotificationType.cpp @@ -12,6 +12,7 @@ #include "td/telegram/Global.h" #include "td/telegram/MessageSender.h" #include "td/telegram/MessagesManager.h" +#include "td/telegram/PhotoFormat.h" #include "td/telegram/StickersManager.h" #include "td/telegram/Td.h" #include "td/telegram/VideoNotesManager.h" diff --git a/td/telegram/Photo.h b/td/telegram/Photo.h index e4c6d181e..e3f5bbf78 100644 --- a/td/telegram/Photo.h +++ b/td/telegram/Photo.h @@ -11,6 +11,7 @@ #include "td/telegram/files/FileId.h" #include "td/telegram/files/FileType.h" #include "td/telegram/net/DcId.h" +#include "td/telegram/PhotoFormat.h" #include "td/telegram/PhotoSizeSource.h" #include "td/telegram/secret_api.h" #include "td/telegram/SecretInputMedia.h" @@ -107,8 +108,6 @@ bool operator!=(const DialogPhoto &lhs, const DialogPhoto &rhs); StringBuilder &operator<<(StringBuilder &string_builder, const DialogPhoto &dialog_photo); -enum class PhotoFormat : int32 { Jpeg, Png, Webp, Gif, Tgs, Mpeg4, Webm }; - PhotoSize get_secret_thumbnail_photo_size(FileManager *file_manager, BufferSlice bytes, DialogId owner_dialog_id, int32 width, int32 height); Variant get_photo_size(FileManager *file_manager, PhotoSizeSource source, int64 id, diff --git a/td/telegram/PhotoFormat.h b/td/telegram/PhotoFormat.h new file mode 100644 index 000000000..0df63d1cc --- /dev/null +++ b/td/telegram/PhotoFormat.h @@ -0,0 +1,15 @@ +// +// Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2022 +// +// 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 + +#include "td/utils/common.h" + +namespace td { + +enum class PhotoFormat : int32 { Jpeg, Png, Webp, Gif, Tgs, Mpeg4, Webm }; + +} // namespace td diff --git a/td/telegram/StickersManager.h b/td/telegram/StickersManager.h index 2b0e1fb80..3a04431dd 100644 --- a/td/telegram/StickersManager.h +++ b/td/telegram/StickersManager.h @@ -11,6 +11,7 @@ #include "td/telegram/files/FileSourceId.h" #include "td/telegram/FullMessageId.h" #include "td/telegram/Photo.h" +#include "td/telegram/PhotoFormat.h" #include "td/telegram/SecretInputMedia.h" #include "td/telegram/SpecialStickerSetType.h" #include "td/telegram/StickerFormat.h" diff --git a/td/telegram/VideoNotesManager.cpp b/td/telegram/VideoNotesManager.cpp index 2a086a6f4..7eb8e2824 100644 --- a/td/telegram/VideoNotesManager.cpp +++ b/td/telegram/VideoNotesManager.cpp @@ -8,6 +8,7 @@ #include "td/telegram/AuthManager.h" #include "td/telegram/files/FileManager.h" +#include "td/telegram/PhotoFormat.h" #include "td/telegram/secret_api.h" #include "td/telegram/Td.h" #include "td/telegram/td_api.h" diff --git a/td/telegram/VideosManager.cpp b/td/telegram/VideosManager.cpp index 951758eb1..ac648a404 100644 --- a/td/telegram/VideosManager.cpp +++ b/td/telegram/VideosManager.cpp @@ -8,6 +8,7 @@ #include "td/telegram/AuthManager.h" #include "td/telegram/files/FileManager.h" +#include "td/telegram/PhotoFormat.h" #include "td/telegram/secret_api.h" #include "td/telegram/Td.h" #include "td/telegram/td_api.h" diff --git a/td/telegram/WebPageBlock.cpp b/td/telegram/WebPageBlock.cpp index 963e79564..09b317670 100644 --- a/td/telegram/WebPageBlock.cpp +++ b/td/telegram/WebPageBlock.cpp @@ -20,6 +20,7 @@ #include "td/telegram/Location.h" #include "td/telegram/Photo.h" #include "td/telegram/Photo.hpp" +#include "td/telegram/PhotoFormat.h" #include "td/telegram/Td.h" #include "td/telegram/Version.h" #include "td/telegram/VideosManager.h" diff --git a/td/telegram/WebPagesManager.cpp b/td/telegram/WebPagesManager.cpp index 1365dbc70..75d18898f 100644 --- a/td/telegram/WebPagesManager.cpp +++ b/td/telegram/WebPagesManager.cpp @@ -21,6 +21,7 @@ #include "td/telegram/MessageEntity.h" #include "td/telegram/MessagesManager.h" #include "td/telegram/Photo.h" +#include "td/telegram/PhotoFormat.h" #include "td/telegram/secret_api.h" #include "td/telegram/StickersManager.h" #include "td/telegram/Td.h"