Move file_reference and notifications logging from WARNING to INFO.
GitOrigin-RevId: e03ee30dac7fbec2930a3cd1c625b43136d3739f
This commit is contained in:
parent
f0cd9805c8
commit
fb4475e83d
@ -1415,7 +1415,7 @@ inputMessageGame bot_user_id:int32 game_short_name:string = InputMessageContent;
|
||||
//@payload The invoice payload @provider_token Payment provider token @provider_data JSON-encoded data about the invoice, which will be shared with the payment provider @start_parameter Unique invoice bot start_parameter for the generation of this invoice
|
||||
inputMessageInvoice invoice:invoice title:string description:string photo_url:string photo_size:int32 photo_width:int32 photo_height:int32 payload:bytes provider_token:string provider_data:string start_parameter:string = InputMessageContent;
|
||||
|
||||
//@description A message with a poll @question Poll question, 1-255 characters @options List of poll answer options, 1-10 strings 1-100 characters each
|
||||
//@description A message with a poll. Polls can't be sent to private or secret chats @question Poll question, 1-255 characters @options List of poll answer options, 1-10 strings 1-100 characters each
|
||||
inputMessagePoll question:string options:vector<string> = InputMessageContent;
|
||||
|
||||
//@description A forwarded message @from_chat_id Identifier for the chat this forwarded message came from @message_id Identifier of the message to forward @in_game_share True, if a game message should be shared within a launched game; applies only to game messages
|
||||
|
@ -22,7 +22,7 @@
|
||||
|
||||
namespace td {
|
||||
|
||||
int VERBOSITY_NAME(file_references) = VERBOSITY_NAME(WARNING);
|
||||
int VERBOSITY_NAME(file_references) = VERBOSITY_NAME(INFO);
|
||||
|
||||
bool FileReferenceManager::is_file_reference_error(const Status &error) {
|
||||
return error.is_error() && error.code() == 400 && begins_with(error.message(), "FILE_REFERENCE_");
|
||||
|
@ -15315,8 +15315,13 @@ Status MessagesManager::can_send_message_content(DialogId dialog_id, const Messa
|
||||
bool can_send_games = true;
|
||||
bool can_send_polls = true;
|
||||
|
||||
auto content_type = content->get_type();
|
||||
switch (dialog_type) {
|
||||
case DialogType::User:
|
||||
if (content_type == MessageContentType::Poll && !is_forward) {
|
||||
return Status::Error(400, "Polls can't be sent to private chats");
|
||||
}
|
||||
break;
|
||||
case DialogType::Chat:
|
||||
// ok
|
||||
break;
|
||||
@ -15331,15 +15336,19 @@ Status MessagesManager::can_send_message_content(DialogId dialog_id, const Messa
|
||||
break;
|
||||
}
|
||||
case DialogType::SecretChat:
|
||||
can_send_games = false;
|
||||
can_send_polls = false;
|
||||
if (content_type == MessageContentType::Game) {
|
||||
return Status::Error(400, "Games can't be sent to secret chats");
|
||||
}
|
||||
if (content_type == MessageContentType::Poll) {
|
||||
return Status::Error(400, "Polls can't be sent to secret chats");
|
||||
}
|
||||
break;
|
||||
case DialogType::None:
|
||||
default:
|
||||
UNREACHABLE();
|
||||
}
|
||||
|
||||
switch (content->get_type()) {
|
||||
switch (content_type) {
|
||||
case MessageContentType::Animation:
|
||||
if (!can_send_animations) {
|
||||
return Status::Error(400, "Not enough rights to send animations to the chat");
|
||||
|
@ -48,7 +48,7 @@
|
||||
|
||||
namespace td {
|
||||
|
||||
int VERBOSITY_NAME(notifications) = VERBOSITY_NAME(WARNING);
|
||||
int VERBOSITY_NAME(notifications) = VERBOSITY_NAME(INFO);
|
||||
|
||||
class SetContactSignUpNotificationQuery : public Td::ResultHandler {
|
||||
Promise<Unit> promise_;
|
||||
|
@ -3893,6 +3893,9 @@ void main(int argc, char **argv) {
|
||||
}
|
||||
|
||||
SET_VERBOSITY_LEVEL(new_verbosity_level);
|
||||
ClientActor::execute(td_api::make_object<td_api::setLogTagVerbosityLevel>("update_file", 2));
|
||||
ClientActor::execute(td_api::make_object<td_api::setLogTagVerbosityLevel>("notifications", 2));
|
||||
ClientActor::execute(td_api::make_object<td_api::setLogTagVerbosityLevel>("file_reference", 2));
|
||||
|
||||
{
|
||||
ConcurrentScheduler scheduler;
|
||||
|
@ -86,7 +86,7 @@ RemoteFileLocation NewRemoteFileLocation::partial_or_empty() const {
|
||||
return {};
|
||||
}
|
||||
|
||||
int VERBOSITY_NAME(update_file) = VERBOSITY_NAME(WARNING);
|
||||
int VERBOSITY_NAME(update_file) = VERBOSITY_NAME(INFO);
|
||||
|
||||
FileNode *FileNodePtr::operator->() const {
|
||||
return get();
|
||||
|
Reference in New Issue
Block a user