mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-09-02 15:45:12 +00:00
Support attach webview bots in topics.
This commit is contained in:
@@ -394,9 +394,10 @@ void SessionNavigation::showPeerByLinkResolved(
|
||||
}
|
||||
if (!attachBotUsername.isEmpty()) {
|
||||
crl::on_main(this, [=] {
|
||||
showPeerHistory(peer->id, params, msgId);
|
||||
const auto history = peer->owner().history(peer);
|
||||
showPeerHistory(history, params, msgId);
|
||||
peer->session().attachWebView().request(
|
||||
peer,
|
||||
Api::SendAction(history),
|
||||
attachBotUsername,
|
||||
info.attachBotToggleCommand.value_or(QString()));
|
||||
});
|
||||
@@ -410,7 +411,10 @@ void SessionNavigation::showPeerByLinkResolved(
|
||||
? contextPeer->asUser()
|
||||
: nullptr;
|
||||
bot->session().attachWebView().requestAddToMenu(
|
||||
contextUser,
|
||||
(contextUser
|
||||
? Api::SendAction(
|
||||
contextUser->owner().history(contextUser))
|
||||
: std::optional<Api::SendAction>()),
|
||||
bot,
|
||||
*info.attachBotToggleCommand,
|
||||
parentController(),
|
||||
|
Reference in New Issue
Block a user