1
0
mirror of https://github.com/InsanusMokrassar/TelegramBotAPI.git synced 2025-09-02 06:39:41 +00:00
This commit is contained in:
2022-05-18 16:31:14 +06:00
parent 78a00f0efb
commit 497974e45c
3 changed files with 12 additions and 3 deletions

View File

@@ -1,6 +1,5 @@
package dev.inmo.tgbotapi.webapps
import dev.inmo.micro_utils.crypto.CryptoJS
import dev.inmo.tgbotapi.utils.TelegramAPIUrlsKeeper
external class WebApp {
@@ -77,7 +76,7 @@ fun WebApp.onMainButtonClicked(eventHandler: EventHandler) = onEvent(EventType.M
*/
fun WebApp.onViewportChanged(eventHandler: ViewportChangedEventHandler) = onEvent(EventType.ViewportChanged, eventHandler)
fun WebApp.isInitDataSafe(botToken: String) = TelegramAPIUrlsKeeper(botToken).checkWebAppLink(
fun WebApp.isInitDataSafe(botToken: String) = TelegramAPIUrlsKeeper(botToken).checkWebAppData(
initData,
initDataUnsafe.hash
)