From 7b4bfbbc21db1d78d76164cae349d46034cfe38c Mon Sep 17 00:00:00 2001 From: Kavalar Date: Sat, 4 Jan 2025 02:23:31 +0300 Subject: [PATCH] debug --- resources/main/js/tg.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/main/js/tg.js b/resources/main/js/tg.js index 519abd3..c03a1b3 100644 --- a/resources/main/js/tg.js +++ b/resources/main/js/tg.js @@ -1,9 +1,9 @@ document.addEventListener("DOMContentLoaded", () => { - let tg = window.Telegram.WebApp; + let tg = window.Telegram.WebAppUser; let username_tag = document.getElementById("username_tag") let user_id_tag = document.getElementById("user_id_tag") username_tag.innerHTML = tg.initDataUnsafe.user.username; - user_id_tag.innerHTML = Telegram.WebApp.initDataUnsafe.userId; + user_id_tag.innerHTML = tg.id; console.log(tg.initDataUnsafe.user) }); \ No newline at end of file