Disable back sending polls to saved messages.
GitOrigin-RevId: 7ad07014892a38c542c6c8ef8962c92a8afc3bd6
This commit is contained in:
parent
d6b87bd121
commit
695782fa84
@ -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<string> is_anonymous:Bool type:PollType = InputMessageContent;
|
||||
|
||||
|
@ -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;
|
||||
|
Reference in New Issue
Block a user