diff --git a/td/generate/scheme/td_api.tl b/td/generate/scheme/td_api.tl index ea2ae9dc7..94c78fad1 100644 --- a/td/generate/scheme/td_api.tl +++ b/td/generate/scheme/td_api.tl @@ -1565,7 +1565,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. Polls can't be sent to secret chats. Polls can be sent to private chats if this is a private chat with self or with a bot only @question Poll question, 1-255 characters @options List of poll answer options, 2-10 strings 1-100 characters each +//@description A message with a poll. Polls can't be sent to secret chats. Polls can be sent only to a private chat with a bot @question Poll question, 1-255 characters @options List of poll answer options, 2-10 strings 1-100 characters each //@is_anonymous True, if the poll voters are anonymous. Non-anonymous polls can't be sent or forwarded to channels @type Type of the poll inputMessagePoll question:string options:vector is_anonymous:Bool type:PollType = InputMessageContent; diff --git a/td/telegram/MessagesManager.cpp b/td/telegram/MessagesManager.cpp index 208d719d0..61f06de53 100644 --- a/td/telegram/MessagesManager.cpp +++ b/td/telegram/MessagesManager.cpp @@ -17787,7 +17787,7 @@ Status MessagesManager::can_send_message_content(DialogId dialog_id, const Messa switch (dialog_type) { case DialogType::User: if (content_type == MessageContentType::Poll && !is_forward && !td_->auth_manager_->is_bot() && - !td_->contacts_manager_->is_user_bot(dialog_id.get_user_id()) && dialog_id != get_my_dialog_id()) { + !td_->contacts_manager_->is_user_bot(dialog_id.get_user_id())) { return Status::Error(400, "Polls can't be sent to the private chat"); } break;