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

Inline switch to pm and back support added for inline bots.

This commit is contained in:
John Preston
2016-04-08 18:16:52 +04:00
parent 8e89486fbc
commit fa0c700ca6
18 changed files with 430 additions and 193 deletions

View File

@@ -83,6 +83,14 @@ namespace App {
box->connect(box, SIGNAL(confirmed(PeerData*)), App::main(), SLOT(onSharePhoneWithBot(PeerData*)));
Ui::showLayer(box);
} break;
case HistoryMessageReplyMarkup::Button::SwitchInline: {
if (MainWidget *m = App::main()) {
if (UserData *bot = msg->history()->peer->asUser()) {
m->inlineSwitchLayer('@' + bot->username + ' ' + QString::fromUtf8(button->data));
}
}
} break;
}
}
@@ -266,6 +274,12 @@ namespace Notify {
}
}
void switchInlineBotButtonReceived(const QString &query) {
if (MainWidget *m = App::main()) {
m->notify_switchInlineBotButtonReceived(query);
}
}
void migrateUpdated(PeerData *peer) {
if (MainWidget *m = App::main()) m->notify_migrateUpdated(peer);
}