feat(channels): inline-кнопки под постами в каналах

This commit is contained in:
klockky
2026-06-28 12:22:08 +03:00
parent 9aac4fb55f
commit c1e65e3d36
8 changed files with 497 additions and 13 deletions
+7 -1
View File
@@ -24,12 +24,18 @@ class WebAppModule {
WebAppModule(this._api);
Future<WebAppLaunch> fetchLaunch(int botId) async {
Future<WebAppLaunch> fetchLaunch(
int botId, {
String? startParam,
int? chatId,
}) async {
if (_api.state != SessionState.online) {
throw const WebAppUnavailable('Нет соединения с сервером');
}
final packet = await _api.sendRequest(Opcode.webAppInitData, {
'botId': botId,
'startParam': ?startParam,
'chatId': ?chatId,
});
if (!packet.isOk) {
throw const WebAppUnavailable('Не удалось открыть мини-приложение');