From 5ecc74237e3c70e06a7e5f08f6926078279a8d1e Mon Sep 17 00:00:00 2001 From: klockky Date: Sun, 7 Jun 2026 19:06:44 +0000 Subject: [PATCH] =?UTF-8?q?fix(sferum):=20=D1=80=D0=B5=D0=B7=D0=BE=D0=BB?= =?UTF-8?q?=D0=B2=D0=B8=D1=82=D1=8C=20=D0=B1=D0=BE=D1=82=D0=B0=20=D0=BF?= =?UTF-8?q?=D0=B5=D1=80=D0=B5=D0=B4=20=D0=B7=D0=B0=D0=BF=D1=80=D0=BE=D1=81?= =?UTF-8?q?=D0=BE=D0=BC=20web-app=20=D0=B4=D0=B0=D0=BD=D0=BD=D1=8B=D1=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/backend/modules/webapp.dart | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lib/backend/modules/webapp.dart b/lib/backend/modules/webapp.dart index b1307f5..db5d0c9 100644 --- a/lib/backend/modules/webapp.dart +++ b/lib/backend/modules/webapp.dart @@ -18,6 +18,7 @@ class WebAppModule { if (_api.state != SessionState.online) { throw const WebAppUnavailable('Нет соединения с сервером'); } + await _resolveBot(botId); final packet = await _api.sendRequest(Opcode.webAppInitData, { 'botId': botId, }); @@ -33,6 +34,14 @@ class WebAppModule { } Future fetchSferum() => fetchLaunch(sferumBotId); + + Future _resolveBot(int botId) async { + try { + await _api.sendRequest(Opcode.contactInfo, { + 'contactIds': [botId], + }); + } catch (_) {} + } } class WebAppUnavailable implements Exception {