From 4aa0291176db06afa1278c6e025099856f440bb6 Mon Sep 17 00:00:00 2001 From: Hewston Fox Date: Sat, 21 Mar 2026 16:45:54 +0200 Subject: [PATCH] feat: add close prompt --- src/tg/index.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/tg/index.ts b/src/tg/index.ts index c953a88..2103bc6 100644 --- a/src/tg/index.ts +++ b/src/tg/index.ts @@ -118,6 +118,12 @@ const externalTgApi = { console.log("TMA swipe behavior initialized"); } + if (tg.closingBehavior.mount.ifAvailable()) { + tg.closingBehavior.mount(); + tg.closingBehavior.enableConfirmation(); + console.log("TMA closing behavior initialized"); + } + console.log( import.meta.env.DEV ? "TMA Debug mode in Web initialized" : "Telegram Mini App initialized", );