Update API scheme, disable scheduled paid.

This commit is contained in:
John Preston
2025-02-25 11:36:51 +04:00
parent 7b7e18e752
commit ee9d0cfd99
14 changed files with 78 additions and 16 deletions

View File

@@ -2573,7 +2573,8 @@ std::unique_ptr<Ui::DropdownMenu> MakeAttachBotsMenu(
const auto source = action.options.scheduled
? Api::SendType::Scheduled
: Api::SendType::Normal;
const auto sendMenuType = action.replyTo.topicRootId
const auto sendMenuType = (action.replyTo.topicRootId
|| action.history->peer->starsPerMessageChecked())
? SendMenu::Type::SilentOnly
: SendMenu::Type::Scheduled;
const auto flag = PollData::Flags();
@@ -2597,7 +2598,8 @@ std::unique_ptr<Ui::DropdownMenu> MakeAttachBotsMenu(
ChooseAndSendLocation(controller, config, actionFactory());
}, &st::menuIconAddress);
}
const auto addBots = Data::CanSend(peer, ChatRestriction::SendInline);
const auto addBots = Data::CanSend(peer, ChatRestriction::SendInline)
&& !peer->starsPerMessageChecked();
for (const auto &bot : bots->attachBots()) {
if (!addBots
|| !bot.inAttachMenu