2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 14:45:14 +00:00

Refactored sending bot commands.

This commit is contained in:
23rd
2021-07-27 02:18:11 +03:00
parent 34cac3092f
commit a030907598
16 changed files with 149 additions and 52 deletions

View File

@@ -828,7 +828,16 @@ crl::time MainWidget::highlightStartTime(not_null<const HistoryItem*> item) cons
}
void MainWidget::sendBotCommand(Bot::SendCommandRequest request) {
_history->sendBotCommand(request);
const auto type = _mainSection
? _mainSection->sendBotCommand(request)
: Window::SectionActionResult::Fallback;
if (type == Window::SectionActionResult::Fallback) {
ui_showPeerHistory(
request.peer->id,
SectionShow::Way::ClearStack,
ShowAtTheEndMsgId);
_history->sendBotCommand(request);
}
}
void MainWidget::hideSingleUseKeyboard(PeerData *peer, MsgId replyTo) {