mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-31 06:35:14 +00:00
Fix switch button in outgoing msgs with keyboards.
Inline bot results panel behaviour improved. Sent and deleted from hard drive GIFs now auto-re-download.
This commit is contained in:
@@ -88,8 +88,16 @@ void activateBotCommand(const HistoryItem *msg, int row, int col) {
|
||||
} break;
|
||||
|
||||
case HistoryMessageReplyMarkup::Button::SwitchInline: {
|
||||
if (MainWidget *m = App::main()) {
|
||||
if (UserData *bot = msg->history()->peer->asUser()) {
|
||||
if (auto m = App::main()) {
|
||||
auto getMessageBot = [msg]() -> UserData* {
|
||||
if (auto bot = msg->viaBot()) {
|
||||
return bot;
|
||||
} else if (auto bot = msg->history()->peer->asUser()) {
|
||||
return bot;
|
||||
}
|
||||
return nullptr;
|
||||
};
|
||||
if (auto bot = getMessageBot()) {
|
||||
auto tryFastSwitch = [bot, &button]() -> bool {
|
||||
if (bot->botInfo && bot->botInfo->inlineReturnPeerId) {
|
||||
if (Notify::switchInlineBotButtonReceived(QString::fromUtf8(button->data))) {
|
||||
|
Reference in New Issue
Block a user