Minor imrovements.
This commit is contained in:
parent
c2ccf0d784
commit
c95cb5d75c
@ -1222,7 +1222,7 @@ reactionTypeCustomEmoji custom_emoji_id:int64 = ReactionType;
|
|||||||
//@description Contains information about a forwarded message
|
//@description Contains information about a forwarded message
|
||||||
//@origin Origin of the forwarded message
|
//@origin Origin of the forwarded message
|
||||||
//@date Point in time (Unix timestamp) when the message was originally sent
|
//@date Point in time (Unix timestamp) when the message was originally sent
|
||||||
//@source For messages forwarded to the chat with the current user (Saved Messages), to the Replies bot chat, or to the channel's discussion group, information about the source message, from which the message was forwarded last time; may be null for other forwards or if unknown
|
//@source For messages forwarded to the chat with the current user (Saved Messages), to the Replies bot chat, or to the channel's discussion group, information about the source message from which the message was forwarded last time; may be null for other forwards or if unknown
|
||||||
//@public_service_announcement_type The type of a public service announcement for the forwarded message
|
//@public_service_announcement_type The type of a public service announcement for the forwarded message
|
||||||
messageForwardInfo origin:MessageOrigin date:int32 source:forwardSource public_service_announcement_type:string = MessageForwardInfo;
|
messageForwardInfo origin:MessageOrigin date:int32 source:forwardSource public_service_announcement_type:string = MessageForwardInfo;
|
||||||
|
|
||||||
@ -1247,7 +1247,7 @@ messageReplyInfo reply_count:int32 recent_replier_ids:vector<MessageSender> last
|
|||||||
//@recent_sender_ids Identifiers of at most 3 recent message senders, added the reaction; available in private, basic group and supergroup chats
|
//@recent_sender_ids Identifiers of at most 3 recent message senders, added the reaction; available in private, basic group and supergroup chats
|
||||||
messageReaction type:ReactionType total_count:int32 is_chosen:Bool used_sender_id:MessageSender recent_sender_ids:vector<MessageSender> = MessageReaction;
|
messageReaction type:ReactionType total_count:int32 is_chosen:Bool used_sender_id:MessageSender recent_sender_ids:vector<MessageSender> = MessageReaction;
|
||||||
|
|
||||||
//@description Contains a list of reactions added to a message @reactions List of added reactions @are_tags True, if the reactions are tags and Telegram Premium users can filter messages by them; currently, always false
|
//@description Contains a list of reactions added to a message @reactions List of added reactions @are_tags True, if the reactions are tags and Telegram Premium users can filter messages by them; currently, always false
|
||||||
messageReactions reactions:vector<messageReaction> are_tags:Bool = MessageReactions;
|
messageReactions reactions:vector<messageReaction> are_tags:Bool = MessageReactions;
|
||||||
|
|
||||||
|
|
||||||
@ -4045,7 +4045,7 @@ availableReaction type:ReactionType needs_premium:Bool = AvailableReaction;
|
|||||||
//@popular_reactions List of popular reactions
|
//@popular_reactions List of popular reactions
|
||||||
//@allow_custom_emoji True, if any custom emoji reaction can be added by Telegram Premium subscribers
|
//@allow_custom_emoji True, if any custom emoji reaction can be added by Telegram Premium subscribers
|
||||||
//@are_tags True, if the reactions will be tags and the message can be found by them; currently, always false
|
//@are_tags True, if the reactions will be tags and the message can be found by them; currently, always false
|
||||||
//@unavailability_reason The reason why the current user can't add reactions to the message, despite some other users can; null if none
|
//@unavailability_reason The reason why the current user can't add reactions to the message, despite some other users can; may be null if none
|
||||||
availableReactions top_reactions:vector<availableReaction> recent_reactions:vector<availableReaction> popular_reactions:vector<availableReaction> allow_custom_emoji:Bool are_tags:Bool unavailability_reason:ReactionUnavailabilityReason = AvailableReactions;
|
availableReactions top_reactions:vector<availableReaction> recent_reactions:vector<availableReaction> popular_reactions:vector<availableReaction> allow_custom_emoji:Bool are_tags:Bool unavailability_reason:ReactionUnavailabilityReason = AvailableReactions;
|
||||||
|
|
||||||
//@description Contains information about an emoji reaction
|
//@description Contains information about an emoji reaction
|
||||||
@ -6730,7 +6730,7 @@ updateActiveEmojiReactions emojis:vector<string> = Update;
|
|||||||
//@description The type of default reaction has changed @reaction_type The new type of the default reaction
|
//@description The type of default reaction has changed @reaction_type The new type of the default reaction
|
||||||
updateDefaultReactionType reaction_type:ReactionType = Update;
|
updateDefaultReactionType reaction_type:ReactionType = Update;
|
||||||
|
|
||||||
//@description Used Saved Messages tags has changed @tags The new used tags
|
//@description Used Saved Messages tags have changed @tags The new used tags
|
||||||
updateSavedMessagesTags tags:savedMessagesTags = Update;
|
updateSavedMessagesTags tags:savedMessagesTags = Update;
|
||||||
|
|
||||||
//@description The parameters of speech recognition without Telegram Premium subscription has changed
|
//@description The parameters of speech recognition without Telegram Premium subscription has changed
|
||||||
|
@ -24,6 +24,7 @@
|
|||||||
#include "td/utils/buffer.h"
|
#include "td/utils/buffer.h"
|
||||||
#include "td/utils/logging.h"
|
#include "td/utils/logging.h"
|
||||||
#include "td/utils/misc.h"
|
#include "td/utils/misc.h"
|
||||||
|
#include "td/utils/SliceBuilder.h"
|
||||||
|
|
||||||
namespace td {
|
namespace td {
|
||||||
|
|
||||||
|
@ -23,6 +23,7 @@
|
|||||||
#include "td/utils/Random.h"
|
#include "td/utils/Random.h"
|
||||||
#include "td/utils/Time.h"
|
#include "td/utils/Time.h"
|
||||||
#include "td/utils/tl_parsers.h"
|
#include "td/utils/tl_parsers.h"
|
||||||
|
#include "td/utils/utf8.h"
|
||||||
|
|
||||||
namespace td {
|
namespace td {
|
||||||
|
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
#include "td/actor/actor.h"
|
#include "td/actor/actor.h"
|
||||||
|
|
||||||
#include "td/utils/buffer.h"
|
#include "td/utils/buffer.h"
|
||||||
|
#include "td/utils/logging.h"
|
||||||
#include "td/utils/Status.h"
|
#include "td/utils/Status.h"
|
||||||
|
|
||||||
namespace td {
|
namespace td {
|
||||||
|
@ -11,9 +11,11 @@
|
|||||||
#include "td/telegram/DialogManager.h"
|
#include "td/telegram/DialogManager.h"
|
||||||
#include "td/telegram/MessageSender.h"
|
#include "td/telegram/MessageSender.h"
|
||||||
#include "td/telegram/MessagesManager.h"
|
#include "td/telegram/MessagesManager.h"
|
||||||
|
#include "td/telegram/ServerMessageId.h"
|
||||||
#include "td/telegram/Td.h"
|
#include "td/telegram/Td.h"
|
||||||
|
|
||||||
#include "td/utils/logging.h"
|
#include "td/utils/logging.h"
|
||||||
|
#include "td/utils/misc.h"
|
||||||
|
|
||||||
namespace td {
|
namespace td {
|
||||||
|
|
||||||
|
@ -6,9 +6,7 @@
|
|||||||
//
|
//
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "td/telegram/DialogId.h"
|
|
||||||
#include "td/telegram/MessageForwardInfo.h"
|
#include "td/telegram/MessageForwardInfo.h"
|
||||||
#include "td/telegram/MessageId.h"
|
|
||||||
#include "td/telegram/MessageOrigin.hpp"
|
#include "td/telegram/MessageOrigin.hpp"
|
||||||
|
|
||||||
#include "td/utils/common.h"
|
#include "td/utils/common.h"
|
||||||
|
@ -207,7 +207,7 @@ class GetPinnedSavedDialogsQuery final : public Td::ResultHandler {
|
|||||||
}
|
}
|
||||||
|
|
||||||
auto result = result_ptr.move_as_ok();
|
auto result = result_ptr.move_as_ok();
|
||||||
LOG(INFO) << "Receive pinned Saved Messages topics: " << to_string(result);
|
LOG(INFO) << "Receive result for GetPinnedSavedDialogsQuery: " << to_string(result);
|
||||||
td_->messages_manager_->on_get_saved_messages_topics(std::move(result), std::move(promise_));
|
td_->messages_manager_->on_get_saved_messages_topics(std::move(result), std::move(promise_));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -241,7 +241,7 @@ class GetSavedDialogsQuery final : public Td::ResultHandler {
|
|||||||
}
|
}
|
||||||
|
|
||||||
auto result = result_ptr.move_as_ok();
|
auto result = result_ptr.move_as_ok();
|
||||||
LOG(INFO) << "Receive Saved Messages topics: " << to_string(result);
|
LOG(INFO) << "Receive result for GetSavedDialogsQuery: " << to_string(result);
|
||||||
td_->messages_manager_->on_get_saved_messages_topics(std::move(result), std::move(promise_));
|
td_->messages_manager_->on_get_saved_messages_topics(std::move(result), std::move(promise_));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -38,6 +38,7 @@
|
|||||||
#include "td/actor/actor.h"
|
#include "td/actor/actor.h"
|
||||||
|
|
||||||
#include "td/utils/algorithm.h"
|
#include "td/utils/algorithm.h"
|
||||||
|
#include "td/utils/FlatHashSet.h"
|
||||||
#include "td/utils/logging.h"
|
#include "td/utils/logging.h"
|
||||||
#include "td/utils/misc.h"
|
#include "td/utils/misc.h"
|
||||||
#include "td/utils/port/Clocks.h"
|
#include "td/utils/port/Clocks.h"
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
#include "td/utils/Status.h"
|
#include "td/utils/Status.h"
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <tuple>
|
#include <type_traits>
|
||||||
|
|
||||||
namespace td {
|
namespace td {
|
||||||
|
|
||||||
@ -594,8 +594,11 @@ void ReactionManager::reload_reactions() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void ReactionManager::reload_reaction_list(ReactionListType reaction_list_type) {
|
void ReactionManager::reload_reaction_list(ReactionListType reaction_list_type) {
|
||||||
|
if (G()->close_flag()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
auto &reaction_list = get_reaction_list(reaction_list_type);
|
auto &reaction_list = get_reaction_list(reaction_list_type);
|
||||||
if (G()->close_flag() || reaction_list.is_being_reloaded_) {
|
if (reaction_list.is_being_reloaded_) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
CHECK(!td_->auth_manager_->is_bot());
|
CHECK(!td_->auth_manager_->is_bot());
|
||||||
|
@ -18,6 +18,7 @@
|
|||||||
|
|
||||||
#include "td/utils/common.h"
|
#include "td/utils/common.h"
|
||||||
#include "td/utils/Promise.h"
|
#include "td/utils/Promise.h"
|
||||||
|
#include "td/utils/Status.h"
|
||||||
#include "td/utils/StringBuilder.h"
|
#include "td/utils/StringBuilder.h"
|
||||||
|
|
||||||
#include <utility>
|
#include <utility>
|
||||||
|
@ -12,6 +12,7 @@
|
|||||||
#include "td/telegram/MessageForwardInfo.h"
|
#include "td/telegram/MessageForwardInfo.h"
|
||||||
#include "td/telegram/MessagesManager.h"
|
#include "td/telegram/MessagesManager.h"
|
||||||
#include "td/telegram/Td.h"
|
#include "td/telegram/Td.h"
|
||||||
|
#include "td/telegram/telegram_api.h"
|
||||||
|
|
||||||
namespace td {
|
namespace td {
|
||||||
|
|
||||||
|
@ -8,6 +8,7 @@
|
|||||||
|
|
||||||
#include "td/telegram/DialogId.h"
|
#include "td/telegram/DialogId.h"
|
||||||
#include "td/telegram/td_api.h"
|
#include "td/telegram/td_api.h"
|
||||||
|
#include "td/telegram/telegram_api.h"
|
||||||
|
|
||||||
#include "td/utils/common.h"
|
#include "td/utils/common.h"
|
||||||
#include "td/utils/HashTableUtils.h"
|
#include "td/utils/HashTableUtils.h"
|
||||||
|
@ -5084,7 +5084,7 @@ void Td::on_request(uint64 id, const td_api::setPinnedSavedMessagesTopics &reque
|
|||||||
CHECK_IS_USER();
|
CHECK_IS_USER();
|
||||||
CREATE_OK_REQUEST_PROMISE();
|
CREATE_OK_REQUEST_PROMISE();
|
||||||
auto saved_messages_topic_ids = transform(request.saved_messages_topics_,
|
auto saved_messages_topic_ids = transform(request.saved_messages_topics_,
|
||||||
[td = this](const auto &topic) { return SavedMessagesTopicId(td, topic); });
|
[this](const auto &topic) { return SavedMessagesTopicId(this, topic); });
|
||||||
messages_manager_->set_pinned_saved_messages_topics(std::move(saved_messages_topic_ids), std::move(promise));
|
messages_manager_->set_pinned_saved_messages_topics(std::move(saved_messages_topic_ids), std::move(promise));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -26,6 +26,7 @@
|
|||||||
#include "td/utils/tl_parsers.h"
|
#include "td/utils/tl_parsers.h"
|
||||||
#include "td/utils/tl_storers.h"
|
#include "td/utils/tl_storers.h"
|
||||||
|
|
||||||
|
#include <functional>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <unordered_map>
|
#include <unordered_map>
|
||||||
#include <utility>
|
#include <utility>
|
||||||
|
@ -116,7 +116,7 @@ class LambdaPromise : public PromiseInterface<ValueT> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <class FromT>
|
template <class FromT>
|
||||||
explicit LambdaPromise(const char *file, int line, FromT &&func)
|
LambdaPromise(const char *file, int line, FromT &&func)
|
||||||
: func_(std::forward<FromT>(func)), state_(State::Ready), file_(file), line_(line) {
|
: func_(std::forward<FromT>(func)), state_(State::Ready), file_(file), line_(line) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user