2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +00:00

Update API scheme on layer 140.

This commit is contained in:
John Preston
2022-03-28 18:02:54 +04:00
parent 20bdbf531a
commit df15ff9f8e
18 changed files with 157 additions and 66 deletions

View File

@@ -65,10 +65,6 @@ namespace Ui::BotWebView {
class Panel;
} // namespace Ui::BotWebView
namespace InlineBots {
struct ResultSelected;
} // namespace InlineBots
namespace Data {
struct CloudTheme;
enum class CloudThemeType;
@@ -205,15 +201,21 @@ public:
};
void showPeerByLink(const PeerByLinkInfo &info);
struct WebViewButton {
QString text;
QByteArray url;
bool simple = false;
};
void resolveAttachWebview(
not_null<PeerData*> peer,
const QString &botUsername);
void requestAttachWebview(
not_null<PeerData*> peer,
not_null<UserData*> bot,
const QByteArray &url = QByteArray());
[[nodiscard]] auto inlineResultConfirmed() const
-> rpl::producer<InlineBots::ResultSelected>;
const WebViewButton &button = WebViewButton());
void requestAttachSimpleWebview(
not_null<UserData*> bot,
const QByteArray &url);
void showRepliesForMessage(
not_null<History*> history,
@@ -287,7 +289,8 @@ private:
not_null<PeerData*> peer,
not_null<UserData*> bot,
uint64 queryId,
const QString &url);
const QString &url,
const QString &buttonText = QString());
void toggleInMenu(
not_null<UserData*> bot,
@@ -305,7 +308,6 @@ private:
mtpRequestId _showingRepliesRequestId = 0;
std::unique_ptr<Ui::BotWebView::Panel> _botWebView;
rpl::event_stream<InlineBots::ResultSelected> _inlineResultConfirmed;
};