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
|
//@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;
|
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;
|
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
|
//@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 {
|
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) {
|
bool FileReferenceManager::is_file_reference_error(const Status &error) {
|
||||||
return error.is_error() && error.code() == 400 && begins_with(error.message(), "FILE_REFERENCE_");
|
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_games = true;
|
||||||
bool can_send_polls = true;
|
bool can_send_polls = true;
|
||||||
|
|
||||||
|
auto content_type = content->get_type();
|
||||||
switch (dialog_type) {
|
switch (dialog_type) {
|
||||||
case DialogType::User:
|
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:
|
case DialogType::Chat:
|
||||||
// ok
|
// ok
|
||||||
break;
|
break;
|
||||||
@ -15331,15 +15336,19 @@ Status MessagesManager::can_send_message_content(DialogId dialog_id, const Messa
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case DialogType::SecretChat:
|
case DialogType::SecretChat:
|
||||||
can_send_games = false;
|
if (content_type == MessageContentType::Game) {
|
||||||
can_send_polls = false;
|
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;
|
break;
|
||||||
case DialogType::None:
|
case DialogType::None:
|
||||||
default:
|
default:
|
||||||
UNREACHABLE();
|
UNREACHABLE();
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (content->get_type()) {
|
switch (content_type) {
|
||||||
case MessageContentType::Animation:
|
case MessageContentType::Animation:
|
||||||
if (!can_send_animations) {
|
if (!can_send_animations) {
|
||||||
return Status::Error(400, "Not enough rights to send animations to the chat");
|
return Status::Error(400, "Not enough rights to send animations to the chat");
|
||||||
|
@ -48,7 +48,7 @@
|
|||||||
|
|
||||||
namespace td {
|
namespace td {
|
||||||
|
|
||||||
int VERBOSITY_NAME(notifications) = VERBOSITY_NAME(WARNING);
|
int VERBOSITY_NAME(notifications) = VERBOSITY_NAME(INFO);
|
||||||
|
|
||||||
class SetContactSignUpNotificationQuery : public Td::ResultHandler {
|
class SetContactSignUpNotificationQuery : public Td::ResultHandler {
|
||||||
Promise<Unit> promise_;
|
Promise<Unit> promise_;
|
||||||
|
@ -3893,6 +3893,9 @@ void main(int argc, char **argv) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
SET_VERBOSITY_LEVEL(new_verbosity_level);
|
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;
|
ConcurrentScheduler scheduler;
|
||||||
|
@ -86,7 +86,7 @@ RemoteFileLocation NewRemoteFileLocation::partial_or_empty() const {
|
|||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
int VERBOSITY_NAME(update_file) = VERBOSITY_NAME(WARNING);
|
int VERBOSITY_NAME(update_file) = VERBOSITY_NAME(INFO);
|
||||||
|
|
||||||
FileNode *FileNodePtr::operator->() const {
|
FileNode *FileNodePtr::operator->() const {
|
||||||
return get();
|
return get();
|
||||||
|
Reference in New Issue
Block a user