Skip to content

Commit

Permalink
user data
Browse files Browse the repository at this point in the history
  • Loading branch information
Adminbck committed Jun 23, 2024
1 parent 43a95b6 commit 1f23eaf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ <h1>Server-Sent Events</h1>
Telegram.WebApp.expand();

// console log
document.getElementById("User").innerHTML = JSON.stringify(Telegram.WebApp.initDataUnsafe.user);
document.getElementById("User").innerHTML = Telegram.WebApp.initDataUnsafe.user.first_name + '\n' + Telegram.WebApp.initDataUnsafe.user.username + '\n';
document.getElementById("Chat").innerHTML = JSON.stringify(Telegram.WebApp.initDataUnsafe.chat);

// Function to call showPopup API
Expand Down

0 comments on commit 1f23eaf

Please sign in to comment.