fix: refresh mini app login state
Deploy Telegram Bot / build-and-push (push) Successful in 4m23s
Deploy Telegram Bot / deploy (push) Successful in 12s

This commit is contained in:
2026-04-28 17:03:53 +03:00
parent 41f2ea6e90
commit 8220f2060f
10 changed files with 102 additions and 15 deletions
@@ -58,6 +58,7 @@
statusMessage = "Mini App доступен из Telegram. Для браузера используйте обычный вход.";
showFallback = true;
StateHasChanged();
await TryWatchLoginAsync();
}
}
catch (JSException)
@@ -65,6 +66,18 @@
statusMessage = "Не удалось получить данные Telegram Mini App. Попробуйте открыть dashboard из бота.";
showFallback = true;
StateHasChanged();
await TryWatchLoginAsync();
}
}
private async Task TryWatchLoginAsync()
{
try
{
await JS.InvokeVoidAsync("watchTelegramMiniAppLogin", "/auth/status", "/");
}
catch (JSException)
{
}
}
}