From a0990ef2fd5ecfc91e886d14d4a374f123a5a29f Mon Sep 17 00:00:00 2001 From: levlam Date: Tue, 15 Aug 2023 17:45:16 +0300 Subject: [PATCH] Various fixes. --- td/generate/scheme/td_api.tl | 8 ++++---- td/telegram/ChatReactions.cpp | 1 - td/telegram/ContactsManager.cpp | 1 + td/telegram/DialogFilter.cpp | 1 - td/telegram/MediaArea.cpp | 2 ++ td/telegram/MessageContent.cpp | 1 - td/telegram/ReactionManager.cpp | 3 +-- td/telegram/StoryManager.cpp | 3 ++- td/telegram/StoryManager.h | 1 - td/telegram/UpdatesManager.cpp | 1 + 10 files changed, 11 insertions(+), 11 deletions(-) diff --git a/td/generate/scheme/td_api.tl b/td/generate/scheme/td_api.tl index 74ba6f24b..1a995e8e0 100644 --- a/td/generate/scheme/td_api.tl +++ b/td/generate/scheme/td_api.tl @@ -4053,7 +4053,7 @@ premiumStoryFeaturePriorityOrder = PremiumStoryFeature; //@description The ability to hide the fact that the user viewed other's stories premiumStoryFeatureStealthMode = PremiumStoryFeature; -//@description The ability to check who opened your stories after they expire +//@description The ability to check who opened the current user's stories after they expire premiumStoryFeaturePermanentViewsHistory = PremiumStoryFeature; //@description The ability to set custom expiration duration for stories @@ -4996,7 +4996,7 @@ storyArea position:storyAreaPosition type:StoryAreaType = StoryArea; //@description An area pointing to a location @location The location inputStoryAreaTypeLocation location:location = InputStoryAreaType; -//@description An area pointing to a venue found by the bot GetOption("venue_search_bot_username") +//@description An area pointing to a venue found by the bot getOption("venue_search_bot_username") //@query_id Identifier of the inline query, used to found the venue //@result_id Identifier of the inline query result inputStoryAreaTypeFoundVenue query_id:int64 result_id:string = InputStoryAreaType; @@ -5887,7 +5887,7 @@ updateStoryDeleted story_sender_chat_id:int53 story_id:int32 = Update; //@description A story has been successfully sent @story The sent story @old_story_id The previous temporary story identifier updateStorySendSucceeded story:story old_story_id:int32 = Update; -//@description A story failed to send. If the story sending is cancelled, then updateStoryDeleted will be received instead of this update +//@description A story failed to send. If the story sending is canceled, then updateStoryDeleted will be received instead of this update //@story The failed to send story //@error The cause of the failure; may be null if unknown //@error_code An error code @@ -5901,7 +5901,7 @@ updateChatActiveStories active_stories:chatActiveStories = Update; //@description Number of chats in a story list has changed @story_list The story list @chat_count Approximate total number of chats with active stories in the list updateStoryListChatCount story_list:StoryList chat_count:int32 = Update; -//@description Story stealth mode settings has changed +//@description Story stealth mode settings have changed //@active_until_date Point in time (Unix timestamp) until stealth mode is active; 0 if it is disabled //@cooldown_until_date Point in time (Unix timestamp) when stealth mode can be enabled again; 0 if there is no active cooldown updateStoryStealthMode active_until_date:int32 cooldown_until_date:int32 = Update; diff --git a/td/telegram/ChatReactions.cpp b/td/telegram/ChatReactions.cpp index 4b1d8bddc..ac2c6370e 100644 --- a/td/telegram/ChatReactions.cpp +++ b/td/telegram/ChatReactions.cpp @@ -7,7 +7,6 @@ #include "td/telegram/ChatReactions.h" #include "td/utils/algorithm.h" -#include "td/utils/format.h" namespace td { diff --git a/td/telegram/ContactsManager.cpp b/td/telegram/ContactsManager.cpp index 204b045c7..43d69ed4b 100644 --- a/td/telegram/ContactsManager.cpp +++ b/td/telegram/ContactsManager.cpp @@ -68,6 +68,7 @@ #include "td/utils/logging.h" #include "td/utils/misc.h" #include "td/utils/Random.h" +#include "td/utils/ScopeGuard.h" #include "td/utils/Slice.h" #include "td/utils/SliceBuilder.h" #include "td/utils/StringBuilder.h" diff --git a/td/telegram/DialogFilter.cpp b/td/telegram/DialogFilter.cpp index 387b2428a..a489bd228 100644 --- a/td/telegram/DialogFilter.cpp +++ b/td/telegram/DialogFilter.cpp @@ -16,7 +16,6 @@ #include "td/utils/algorithm.h" #include "td/utils/emoji.h" #include "td/utils/FlatHashSet.h" -#include "td/utils/format.h" #include "td/utils/logging.h" #include "td/utils/misc.h" diff --git a/td/telegram/MediaArea.cpp b/td/telegram/MediaArea.cpp index 6607a5eb9..9d1182902 100644 --- a/td/telegram/MediaArea.cpp +++ b/td/telegram/MediaArea.cpp @@ -9,6 +9,8 @@ #include "td/telegram/InlineQueriesManager.h" #include "td/telegram/Td.h" +#include "td/utils/logging.h" + namespace td { MediaArea::MediaArea(Td *td, telegram_api::object_ptr &&media_area_ptr) { diff --git a/td/telegram/MessageContent.cpp b/td/telegram/MessageContent.cpp index c9adb1ccf..96e259032 100644 --- a/td/telegram/MessageContent.cpp +++ b/td/telegram/MessageContent.cpp @@ -62,7 +62,6 @@ #include "td/telegram/PollId.h" #include "td/telegram/PollId.hpp" #include "td/telegram/PollManager.h" -#include "td/telegram/ReactionManager.h" #include "td/telegram/secret_api.hpp" #include "td/telegram/SecureValue.h" #include "td/telegram/SecureValue.hpp" diff --git a/td/telegram/ReactionManager.cpp b/td/telegram/ReactionManager.cpp index dd736c63b..a064b6c8c 100644 --- a/td/telegram/ReactionManager.cpp +++ b/td/telegram/ReactionManager.cpp @@ -326,8 +326,7 @@ td_api::object_ptr ReactionManager::get_available_re ChatReactions available_reactions; available_reactions.reaction_types_ = active_reaction_types_; available_reactions.allow_custom_ = true; - return td_->reaction_manager_->get_sorted_available_reactions(std::move(available_reactions), - ChatReactions(true, true), row_size); + return get_sorted_available_reactions(std::move(available_reactions), ChatReactions(true, true), row_size); } void ReactionManager::add_recent_reaction(const ReactionType &reaction_type) { diff --git a/td/telegram/StoryManager.cpp b/td/telegram/StoryManager.cpp index e6fb04205..9ea84ac1a 100644 --- a/td/telegram/StoryManager.cpp +++ b/td/telegram/StoryManager.cpp @@ -25,11 +25,11 @@ #include "td/telegram/ReactionManager.h" #include "td/telegram/ReactionType.hpp" #include "td/telegram/ReportReason.h" -#include "td/telegram/StickersManager.h" #include "td/telegram/StoryContent.h" #include "td/telegram/StoryContentType.h" #include "td/telegram/StoryInteractionInfo.hpp" #include "td/telegram/StoryStealthMode.hpp" +#include "td/telegram/StoryViewer.h" #include "td/telegram/Td.h" #include "td/telegram/TdDb.h" #include "td/telegram/telegram_api.h" @@ -48,6 +48,7 @@ #include "td/utils/logging.h" #include "td/utils/misc.h" #include "td/utils/Random.h" +#include "td/utils/Slice.h" #include "td/utils/Status.h" #include "td/utils/Time.h" #include "td/utils/tl_helpers.h" diff --git a/td/telegram/StoryManager.h b/td/telegram/StoryManager.h index fa24fe58a..f3dc42865 100644 --- a/td/telegram/StoryManager.h +++ b/td/telegram/StoryManager.h @@ -20,7 +20,6 @@ #include "td/telegram/StoryInteractionInfo.h" #include "td/telegram/StoryListId.h" #include "td/telegram/StoryStealthMode.h" -#include "td/telegram/StoryViewer.h" #include "td/telegram/td_api.h" #include "td/telegram/telegram_api.h" #include "td/telegram/UserId.h" diff --git a/td/telegram/UpdatesManager.cpp b/td/telegram/UpdatesManager.cpp index bd32a63c9..f824f9f30 100644 --- a/td/telegram/UpdatesManager.cpp +++ b/td/telegram/UpdatesManager.cpp @@ -46,6 +46,7 @@ #include "td/telegram/PrivacyManager.h" #include "td/telegram/PublicDialogType.h" #include "td/telegram/ReactionManager.h" +#include "td/telegram/ReactionType.h" #include "td/telegram/ScheduledServerMessageId.h" #include "td/telegram/SecretChatId.h" #include "td/telegram/SecretChatsManager.h"