Minor improvements.
This commit is contained in:
parent
eff7675749
commit
a4fc556e5e
@ -1412,7 +1412,7 @@ replyMarkupForceReply is_personal:Bool input_field_placeholder:string = ReplyMar
|
|||||||
|
|
||||||
//@description Contains a custom keyboard layout to quickly reply to bots
|
//@description Contains a custom keyboard layout to quickly reply to bots
|
||||||
//@rows A list of rows of bot keyboard buttons
|
//@rows A list of rows of bot keyboard buttons
|
||||||
//@is_persistent True, if the keyboard should be shown all the time while ordinary keyboard is minimized
|
//@is_persistent True, if the keyboard is supposed be shown all the time while ordinary keyboard is minimized
|
||||||
//@resize_keyboard True, if the application needs to resize the keyboard vertically
|
//@resize_keyboard True, if the application needs to resize the keyboard vertically
|
||||||
//@one_time True, if the application needs to hide the keyboard after use
|
//@one_time True, if the application needs to hide the keyboard after use
|
||||||
//@is_personal True, if the keyboard must automatically be shown to the current user. For outgoing messages, specify true to show the keyboard only for the mentioned users and for the target user of a reply
|
//@is_personal True, if the keyboard must automatically be shown to the current user. For outgoing messages, specify true to show the keyboard only for the mentioned users and for the target user of a reply
|
||||||
@ -2244,7 +2244,7 @@ messageText text:formattedText web_page:webPage = MessageContent;
|
|||||||
//@description An animation message (GIF-style).
|
//@description An animation message (GIF-style).
|
||||||
//@animation The animation description
|
//@animation The animation description
|
||||||
//@caption Animation caption
|
//@caption Animation caption
|
||||||
//@has_spoiler True, if the animation preview should be covered by a spoiler animation
|
//@has_spoiler True, if the animation preview must be covered by a spoiler animation
|
||||||
//@is_secret True, if the animation thumbnail must be blurred and the animation must be shown only while tapped
|
//@is_secret True, if the animation thumbnail must be blurred and the animation must be shown only while tapped
|
||||||
messageAnimation animation:animation caption:formattedText has_spoiler:Bool is_secret:Bool = MessageContent;
|
messageAnimation animation:animation caption:formattedText has_spoiler:Bool is_secret:Bool = MessageContent;
|
||||||
|
|
||||||
@ -2257,7 +2257,7 @@ messageDocument document:document caption:formattedText = MessageContent;
|
|||||||
//@description A photo message
|
//@description A photo message
|
||||||
//@photo The photo
|
//@photo The photo
|
||||||
//@caption Photo caption
|
//@caption Photo caption
|
||||||
//@has_spoiler True, if the photo preview should be covered by a spoiler animation
|
//@has_spoiler True, if the photo preview must be covered by a spoiler animation
|
||||||
//@is_secret True, if the photo must be blurred and must be shown only while tapped
|
//@is_secret True, if the photo must be blurred and must be shown only while tapped
|
||||||
messagePhoto photo:photo caption:formattedText has_spoiler:Bool is_secret:Bool = MessageContent;
|
messagePhoto photo:photo caption:formattedText has_spoiler:Bool is_secret:Bool = MessageContent;
|
||||||
|
|
||||||
@ -2270,7 +2270,7 @@ messageSticker sticker:sticker is_premium:Bool = MessageContent;
|
|||||||
//@description A video message
|
//@description A video message
|
||||||
//@video The video description
|
//@video The video description
|
||||||
//@caption Video caption
|
//@caption Video caption
|
||||||
//@has_spoiler True, if the video preview should be covered by a spoiler animation
|
//@has_spoiler True, if the video preview must be covered by a spoiler animation
|
||||||
//@is_secret True, if the video thumbnail must be blurred and the video must be shown only while tapped
|
//@is_secret True, if the video thumbnail must be blurred and the video must be shown only while tapped
|
||||||
messageVideo video:video caption:formattedText has_spoiler:Bool is_secret:Bool = MessageContent;
|
messageVideo video:video caption:formattedText has_spoiler:Bool is_secret:Bool = MessageContent;
|
||||||
|
|
||||||
@ -2578,7 +2578,7 @@ inputMessageText text:formattedText disable_web_page_preview:Bool clear_draft:Bo
|
|||||||
//@width Width of the animation; may be replaced by the server
|
//@width Width of the animation; may be replaced by the server
|
||||||
//@height Height of the animation; may be replaced by the server
|
//@height Height of the animation; may be replaced by the server
|
||||||
//@caption Animation caption; pass null to use an empty caption; 0-getOption("message_caption_length_max") characters
|
//@caption Animation caption; pass null to use an empty caption; 0-getOption("message_caption_length_max") characters
|
||||||
//@has_spoiler True, if the animation preview should be covered by a spoiler animation; not supported in secret chats
|
//@has_spoiler True, if the animation preview must be covered by a spoiler animation; not supported in secret chats
|
||||||
inputMessageAnimation animation:InputFile thumbnail:inputThumbnail added_sticker_file_ids:vector<int32> duration:int32 width:int32 height:int32 caption:formattedText has_spoiler:Bool = InputMessageContent;
|
inputMessageAnimation animation:InputFile thumbnail:inputThumbnail added_sticker_file_ids:vector<int32> duration:int32 width:int32 height:int32 caption:formattedText has_spoiler:Bool = InputMessageContent;
|
||||||
|
|
||||||
//@description An audio message
|
//@description An audio message
|
||||||
@ -2605,7 +2605,7 @@ inputMessageDocument document:InputFile thumbnail:inputThumbnail disable_content
|
|||||||
//@height Photo height
|
//@height Photo height
|
||||||
//@caption Photo caption; pass null to use an empty caption; 0-getOption("message_caption_length_max") characters
|
//@caption Photo caption; pass null to use an empty caption; 0-getOption("message_caption_length_max") characters
|
||||||
//@ttl Photo TTL (Time To Live), in seconds (0-60). A non-zero TTL can be specified only in private chats
|
//@ttl Photo TTL (Time To Live), in seconds (0-60). A non-zero TTL can be specified only in private chats
|
||||||
//@has_spoiler True, if the photo preview should be covered by a spoiler animation; not supported in secret chats
|
//@has_spoiler True, if the photo preview must be covered by a spoiler animation; not supported in secret chats
|
||||||
inputMessagePhoto photo:InputFile thumbnail:inputThumbnail added_sticker_file_ids:vector<int32> width:int32 height:int32 caption:formattedText ttl:int32 has_spoiler:Bool = InputMessageContent;
|
inputMessagePhoto photo:InputFile thumbnail:inputThumbnail added_sticker_file_ids:vector<int32> width:int32 height:int32 caption:formattedText ttl:int32 has_spoiler:Bool = InputMessageContent;
|
||||||
|
|
||||||
//@description A sticker message
|
//@description A sticker message
|
||||||
@ -2626,7 +2626,7 @@ inputMessageSticker sticker:InputFile thumbnail:inputThumbnail width:int32 heigh
|
|||||||
//@supports_streaming True, if the video is supposed to be streamed
|
//@supports_streaming True, if the video is supposed to be streamed
|
||||||
//@caption Video caption; pass null to use an empty caption; 0-getOption("message_caption_length_max") characters
|
//@caption Video caption; pass null to use an empty caption; 0-getOption("message_caption_length_max") characters
|
||||||
//@ttl Video TTL (Time To Live), in seconds (0-60). A non-zero TTL can be specified only in private chats
|
//@ttl Video TTL (Time To Live), in seconds (0-60). A non-zero TTL can be specified only in private chats
|
||||||
//@has_spoiler True, if the video preview should be covered by a spoiler animation; not supported in secret chats
|
//@has_spoiler True, if the video preview must be covered by a spoiler animation; not supported in secret chats
|
||||||
inputMessageVideo video:InputFile thumbnail:inputThumbnail added_sticker_file_ids:vector<int32> duration:int32 width:int32 height:int32 supports_streaming:Bool caption:formattedText ttl:int32 has_spoiler:Bool = InputMessageContent;
|
inputMessageVideo video:InputFile thumbnail:inputThumbnail added_sticker_file_ids:vector<int32> duration:int32 width:int32 height:int32 supports_streaming:Bool caption:formattedText ttl:int32 has_spoiler:Bool = InputMessageContent;
|
||||||
|
|
||||||
//@description A video note message
|
//@description A video note message
|
||||||
@ -6636,7 +6636,7 @@ getAttachmentMenuBot bot_user_id:int53 = AttachmentMenuBot;
|
|||||||
toggleBotIsAddedToAttachmentMenu bot_user_id:int53 is_added:Bool allow_write_access:Bool = Ok;
|
toggleBotIsAddedToAttachmentMenu bot_user_id:int53 is_added:Bool allow_write_access:Bool = Ok;
|
||||||
|
|
||||||
|
|
||||||
//@description Returns up to 8 emoji statuses, which should be shown right after the default Premium Badge in the emoji status list
|
//@description Returns up to 8 emoji statuses, which must be shown right after the default Premium Badge in the emoji status list
|
||||||
getThemedEmojiStatuses = EmojiStatuses;
|
getThemedEmojiStatuses = EmojiStatuses;
|
||||||
|
|
||||||
//@description Returns recent emoji statuses
|
//@description Returns recent emoji statuses
|
||||||
|
@ -76,6 +76,7 @@
|
|||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <limits>
|
#include <limits>
|
||||||
#include <tuple>
|
#include <tuple>
|
||||||
|
#include <type_traits>
|
||||||
#include <unordered_map>
|
#include <unordered_map>
|
||||||
#include <unordered_set>
|
#include <unordered_set>
|
||||||
#include <utility>
|
#include <utility>
|
||||||
|
@ -39473,7 +39473,7 @@ void MessagesManager::on_get_channel_difference(
|
|||||||
}
|
}
|
||||||
|
|
||||||
int32 cur_pts = d->pts <= 0 ? 1 : d->pts;
|
int32 cur_pts = d->pts <= 0 ? 1 : d->pts;
|
||||||
LOG_IF(ERROR, cur_pts != request_pts) << "Channel pts has changed from " << request_pts << " to " << d->pts << " in "
|
LOG_IF(ERROR, cur_pts != request_pts) << "Channel PTS has changed from " << request_pts << " to " << d->pts << " in "
|
||||||
<< dialog_id << " during getChannelDifference";
|
<< dialog_id << " during getChannelDifference";
|
||||||
|
|
||||||
bool is_final = true;
|
bool is_final = true;
|
||||||
@ -39496,7 +39496,7 @@ void MessagesManager::on_get_channel_difference(
|
|||||||
if (request_pts != difference->pts_ && !td_->auth_manager_->is_bot() &&
|
if (request_pts != difference->pts_ && !td_->auth_manager_->is_bot() &&
|
||||||
have_input_peer(dialog_id, AccessRights::Read)) {
|
have_input_peer(dialog_id, AccessRights::Read)) {
|
||||||
LOG(ERROR) << "Receive channelDifferenceEmpty as result of getChannelDifference with pts = " << request_pts
|
LOG(ERROR) << "Receive channelDifferenceEmpty as result of getChannelDifference with pts = " << request_pts
|
||||||
<< " and limit = " << request_limit << " in " << dialog_id << ", but pts has changed to "
|
<< " and limit = " << request_limit << " in " << dialog_id << ", but PTS has changed to "
|
||||||
<< difference->pts_;
|
<< difference->pts_;
|
||||||
}
|
}
|
||||||
set_channel_pts(d, difference->pts_, "channel difference empty");
|
set_channel_pts(d, difference->pts_, "channel difference empty");
|
||||||
@ -39514,7 +39514,7 @@ void MessagesManager::on_get_channel_difference(
|
|||||||
auto new_pts = difference->pts_;
|
auto new_pts = difference->pts_;
|
||||||
if (request_pts >= new_pts && request_pts > 1 && (request_pts > new_pts || !td_->auth_manager_->is_bot())) {
|
if (request_pts >= new_pts && request_pts > 1 && (request_pts > new_pts || !td_->auth_manager_->is_bot())) {
|
||||||
LOG(ERROR) << "Receive channelDifference as result of getChannelDifference with pts = " << request_pts
|
LOG(ERROR) << "Receive channelDifference as result of getChannelDifference with pts = " << request_pts
|
||||||
<< " and limit = " << request_limit << " in " << dialog_id << ", but pts has changed from " << d->pts
|
<< " and limit = " << request_limit << " in " << dialog_id << ", but PTS has changed from " << d->pts
|
||||||
<< " to " << new_pts << ". Difference: " << oneline(to_string(difference));
|
<< " to " << new_pts << ". Difference: " << oneline(to_string(difference));
|
||||||
new_pts = request_pts + 1;
|
new_pts = request_pts + 1;
|
||||||
}
|
}
|
||||||
@ -39577,7 +39577,7 @@ void MessagesManager::on_get_channel_difference(
|
|||||||
auto new_pts = dialog->pts_;
|
auto new_pts = dialog->pts_;
|
||||||
if (request_pts > new_pts - request_limit) {
|
if (request_pts > new_pts - request_limit) {
|
||||||
LOG(ERROR) << "Receive channelDifferenceTooLong as result of getChannelDifference with pts = " << request_pts
|
LOG(ERROR) << "Receive channelDifferenceTooLong as result of getChannelDifference with pts = " << request_pts
|
||||||
<< " and limit = " << request_limit << " in " << dialog_id << ", but pts has changed from " << d->pts
|
<< " and limit = " << request_limit << " in " << dialog_id << ", but PTS has changed from " << d->pts
|
||||||
<< " to " << new_pts << ". Difference: " << oneline(to_string(difference));
|
<< " to " << new_pts << ". Difference: " << oneline(to_string(difference));
|
||||||
if (request_pts >= new_pts) {
|
if (request_pts >= new_pts) {
|
||||||
new_pts = request_pts + 1;
|
new_pts = request_pts + 1;
|
||||||
|
@ -5506,7 +5506,8 @@ void StickersManager::on_reload_sticker_set(StickerSetId sticker_set_id, Result<
|
|||||||
if (!queries->pending_promises_.empty()) {
|
if (!queries->pending_promises_.empty()) {
|
||||||
auto sticker_set = get_sticker_set(sticker_set_id);
|
auto sticker_set = get_sticker_set(sticker_set_id);
|
||||||
auto access_hash = sticker_set == nullptr ? 0 : sticker_set->access_hash_;
|
auto access_hash = sticker_set == nullptr ? 0 : sticker_set->access_hash_;
|
||||||
for (auto &promise : queries->pending_promises_) {
|
auto promises = std::move(queries->pending_promises_);
|
||||||
|
for (auto &promise : promises) {
|
||||||
do_reload_sticker_set(sticker_set_id,
|
do_reload_sticker_set(sticker_set_id,
|
||||||
make_tl_object<telegram_api::inputStickerSetID>(sticker_set_id.get(), access_hash),
|
make_tl_object<telegram_api::inputStickerSetID>(sticker_set_id.get(), access_hash),
|
||||||
queries->pending_hash_, std::move(promise), "on_reload_sticker_set");
|
queries->pending_hash_, std::move(promise), "on_reload_sticker_set");
|
||||||
|
@ -8,7 +8,6 @@
|
|||||||
|
|
||||||
#include "td/telegram/AuthManager.h"
|
#include "td/telegram/AuthManager.h"
|
||||||
#include "td/telegram/files/FileManager.h"
|
#include "td/telegram/files/FileManager.h"
|
||||||
#include "td/telegram/files/FileType.h"
|
|
||||||
#include "td/telegram/Global.h"
|
#include "td/telegram/Global.h"
|
||||||
#include "td/telegram/PhotoFormat.h"
|
#include "td/telegram/PhotoFormat.h"
|
||||||
#include "td/telegram/secret_api.h"
|
#include "td/telegram/secret_api.h"
|
||||||
|
Loading…
Reference in New Issue
Block a user