From 21304fe7413173fcf96d56c7af69149444a347f8 Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Sun, 17 Nov 2024 11:50:35 +0000 Subject: [PATCH] Update content of files --- data/web/blogfork.telegram.org/bots.html | 56 +- .../blogfork.telegram.org/bots/features.html | 174 +++- data/web/core.telegram.org/bots.html | 56 +- data/web/core.telegram.org/bots/features.html | 174 +++- data/web/corefork.telegram.org/bots.html | 56 +- data/web/telegram.org.html | 24 +- data/web/telegram.org/api.html | 24 +- data/web/telegram.org/blog.html | 16 +- data/web/telegram.org/blog/200-million.html | 24 +- data/web/telegram.org/blog/400-million.html | 24 +- data/web/telegram.org/blog/6-years.html | 24 +- .../blog/700-million-and-premium.html | 24 +- .../telegram.org/blog/admin-revolution.html | 24 +- .../blog/albums-saved-messages.html | 24 +- data/web/telegram.org/blog/android-2-0.html | 24 +- data/web/telegram.org/blog/android-gif.html | 24 +- .../telegram.org/blog/android-streaming.html | 24 +- .../web/telegram.org/blog/android-themes.html | 24 +- .../telegram.org/blog/android-wear-2-0.html | 24 +- .../blog/animated-backgrounds.html | 24 +- .../telegram.org/blog/animated-stickers.html | 24 +- data/web/telegram.org/blog/apple-watch.html | 24 +- .../blog/archive-and-new-design.html | 24 +- .../telegram.org/blog/autodelete-inv2.html | 24 +- data/web/telegram.org/blog/autoplay.html | 24 +- .../telegram.org/blog/backgrounds-2-0.html | 24 +- .../web/telegram.org/blog/bot-revolution.html | 24 +- data/web/telegram.org/blog/bots-2-0.html | 24 +- .../telegram.org/blog/cache-and-stickers.html | 24 +- .../web/telegram.org/blog/calls-and-bots.html | 24 +- data/web/telegram.org/blog/calls.html | 24 +- .../telegram.org/blog/captions-places.html | 24 +- .../telegram.org/blog/channel-stories.html | 24 +- data/web/telegram.org/blog/channels-2-0.html | 24 +- data/web/telegram.org/blog/channels.html | 24 +- ...hemes-interactive-emoji-read-receipts.html | 24 +- .../blog/contacts-local-groups.html | 24 +- data/web/telegram.org/blog/coronavirus.html | 24 +- .../crowdsourcing-a-more-secure-future.html | 24 +- .../telegram.org/blog/cryptocontest-ends.html | 24 +- data/web/telegram.org/blog/cryptocontest.html | 24 +- data/web/telegram.org/blog/custom-emoji.html | 24 +- data/web/telegram.org/blog/desktop-1-0.html | 24 +- .../telegram.org/blog/desktop-compact.html | 24 +- .../blog/discover-stickers-and-more.html | 24 +- .../blog/downloads-attachments-streaming.html | 24 +- data/web/telegram.org/blog/drafts.html | 24 +- .../blog/dynamic-video-quality-and-more.html | 24 +- data/web/telegram.org/blog/edit.html | 24 +- .../web/telegram.org/blog/encrypted-cdns.html | 24 +- .../telegram.org/blog/export-and-more.html | 24 +- data/web/telegram.org/blog/february2024.html | 24 +- .../telegram.org/blog/files-on-steroids.html | 24 +- .../filters-anonymous-admins-comments.html | 24 +- data/web/telegram.org/blog/folders.html | 24 +- data/web/telegram.org/blog/games.html | 24 +- .../web/telegram.org/blog/gif-revolution.html | 24 +- data/web/telegram.org/blog/gifs.html | 24 +- .../blog/gifts-verification-platform.html | 24 +- data/web/telegram.org/blog/giveaways.html | 24 +- .../telegram.org/blog/group-video-calls.html | 24 +- ...idden-media-zero-storage-profile-pics.html | 24 +- .../blog/infinite-reactions-statuses.html | 24 +- data/web/telegram.org/blog/inline-bots.html | 24 +- .../web/telegram.org/blog/instant-camera.html | 24 +- .../blog/instant-view-contest-200K.html | 24 +- data/web/telegram.org/blog/instant-view.html | 24 +- data/web/telegram.org/blog/invite-links.html | 24 +- data/web/telegram.org/blog/link-preview.html | 24 +- .../web/telegram.org/blog/live-locations.html | 24 +- .../live-streams-forwarding-next-channel.html | 24 +- data/web/telegram.org/blog/login.html | 24 +- data/web/telegram.org/blog/masks.html | 24 +- .../blog/message-effects-and-more.html | 24 +- .../mini-app-bar-paid-media-and-more.html | 24 +- data/web/telegram.org/blog/moar-stickers.html | 24 +- .../blog/monetization-for-channels.html | 24 +- data/web/telegram.org/blog/move-history.html | 24 +- .../blog/my-profile-and-15-more.html | 24 +- .../blog/new-profiles-people-nearby.html | 24 +- .../blog/new-saved-messages-and-9-more.html | 24 +- .../telegram.org/blog/notifications-bots.html | 24 +- .../web/telegram.org/blog/now-you-see-me.html | 24 +- data/web/telegram.org/blog/passport.html | 24 +- .../payments-2-0-scheduled-voice-chats.html | 24 +- data/web/telegram.org/blog/payments.html | 24 +- .../blog/permissions-groups-undo.html | 24 +- .../blog/photo-editor-and-passcodes.html | 24 +- data/web/telegram.org/blog/pin-and-ifttt.html | 24 +- .../pinned-messages-locations-playlists.html | 24 +- .../world.html | 24 +- data/web/telegram.org/blog/polls-2-0-vmq.html | 24 +- data/web/telegram.org/blog/polls.html | 24 +- .../blog/posts-in-stories-and-more.html | 24 +- data/web/telegram.org/blog/power-saving.html | 24 +- .../blog/privacy-discussions-web-bots.html | 24 +- .../telegram.org/blog/privacy-revolution.html | 24 +- .../blog/profile-pics-emoji-translations.html | 24 +- ...profile-videos-people-nearby-and-more.html | 24 +- ...ected-content-delete-by-date-and-more.html | 24 +- .../blog/reactions-spoilers-translations.html | 24 +- .../blog/replies-mentions-hashtags.html | 24 +- .../blog/replies-mentions-stickers.html | 24 +- .../telegram.org/blog/reply-revolution.html | 24 +- .../blog/scheduled-reminders-themes.html | 24 +- .../telegram.org/blog/search-and-media.html | 24 +- .../sessions-and-2-step-verification.html | 24 +- data/web/telegram.org/blog/share-preview.html | 24 +- .../shareable-folders-custom-wallpapers.html | 24 +- data/web/telegram.org/blog/shared-files.html | 24 +- data/web/telegram.org/blog/shared-links.html | 24 +- ...lling-calendar-join-requests-and-more.html | 24 +- .../blog/silent-messages-slow-mode.html | 24 +- .../telegram.org/blog/similar-channels.html | 24 +- .../blog/star-giveaways-iv-in-browser.html | 24 +- data/web/telegram.org/blog/sticker-maker.html | 24 +- .../blog/stickers-meet-art-and-history.html | 24 +- .../blog/stickers-revolution.html | 24 +- data/web/telegram.org/blog/stickers.html | 24 +- data/web/telegram.org/blog/stories.html | 24 +- ...channels-star-reactions-subscriptions.html | 24 +- data/web/telegram.org/blog/supergroups.html | 24 +- data/web/telegram.org/blog/supergroups5k.html | 24 +- data/web/telegram.org/blog/tdlib.html | 24 +- .../web/telegram.org/blog/telegram-5-ios.html | 24 +- .../telegram.org/blog/telegram-business.html | 24 +- .../telegram-me-change-number-and-pfs.html | 24 +- .../web/telegram.org/blog/telegram-stars.html | 24 +- data/web/telegram.org/blog/telegram-x.html | 24 +- data/web/telegram.org/blog/telegraph.html | 24 +- .../telegram.org/blog/themes-accounts.html | 24 +- ...opics-in-groups-collectible-usernames.html | 24 +- .../telegram.org/blog/translations-iv2.html | 24 +- .../telegram.org/blog/trending-stickers.html | 24 +- .../blog/ultimate-privacy-topics-2-0.html | 24 +- .../telegram.org/blog/unread-replace-2x.html | 24 +- .../telegram.org/blog/unsend-and-usage.html | 24 +- .../blog/unsend-privacy-emoji.html | 24 +- .../blog/usernames-and-secret-chats-v2.html | 24 +- .../blog/verifiable-apps-and-more.html | 24 +- data/web/telegram.org/blog/video-1000.html | 24 +- data/web/telegram.org/blog/video-calls.html | 24 +- .../telegram.org/blog/video-editor-gifs.html | 24 +- .../blog/video-messages-and-telescope.html | 24 +- .../blog/video-stickers-better-reactions.html | 24 +- .../telegram.org/blog/voice-2-secret-3.html | 24 +- .../blog/voice-chats-on-steroids.html | 24 +- data/web/telegram.org/blog/voice-chats.html | 24 +- .../blog/w3-browser-mini-app-store.html | 24 +- .../blog/winter-contest-ends.html | 24 +- data/web/telegram.org/js/telegram-web-app.js | 929 +++++++++++++++++- data/web/telegram.org/privacy-tpa..html | 24 +- data/web/telegram.org/t.me/PremiumBot.html | 24 +- .../what-can-you-do-with-Telegram.html | 24 +- .../js/webappdemo.js | 9 +- 155 files changed, 3115 insertions(+), 1883 deletions(-) diff --git a/data/web/blogfork.telegram.org/bots.html b/data/web/blogfork.telegram.org/bots.html index f0c78af118..59d72611a2 100644 --- a/data/web/blogfork.telegram.org/bots.html +++ b/data/web/blogfork.telegram.org/bots.html @@ -57,15 +57,16 @@
  • Manage Your Business
  • Receive Payments
  • Create Custom Tools
  • -
  • Integrate with Other Services
  • +
  • Integrate with Services and Devices
  • Host Games
  • Build Social Networks
  • +
  • Monetize Your Project
  • Anything Else!
  • Replace Entire Websites

    Telegram bots can host Mini Apps built with JavaScript. This allows for infinitely flexible interfaces that can power everything from online stores to arcade games. Unlike websites, bots support seamless authorization and notifications through Telegram out of the box.

    -
    @@ -77,7 +78,7 @@

    Telegram Business users can connect Telegram bots to process and answer messages on their behalf, via their personal account. This allows businesses to seamlessly integrate any existing tools and workflows, or add new AI assistants to increase productivity.

    As we continue to expand the set of free tools available to bots through this integration, we encourage all developers to innovate and develop useful applications and services for businesses on Telegram.

    -
    @@ -88,8 +89,8 @@
    Receive Payments

    Bots can sell all kinds of goods and services on Telegram – to anyone in the world. Telegram Stars allow users to securely and effortlessly buy digital products via in-app purchases. In addition, physical products can be purchased through more than 20 integrated payment providers.

    -
    @@ -99,33 +100,43 @@

    Create Custom Tools

    Increase your productivity by creating bots for specific tasks – like converting files, managing chats or fetching today’s forecast. Users can chat directly with bots, or add them to groups and channels to introduce extra features.

    -
    -

    Try @QuizBot to combine several quiz-style polls into a proper quiz.

    +

    Mini apps can generate media and files – that users can effortlessly share to other chats or a post as a story.

    -

    Integrate with Other Services

    -

    Many popular platforms already have official Telegram bots, which allow users to comfortably access content in one app – or perform quick searches using inline mode.

    +

    Integrate with Services and Devices

    +

    Mini apps can seamlessly integrate with third-party services, APIs and devices to instantly process and update information – like changing a user's emoji status when they start a game 🎮 or get in a taxi 🚕.

    +
    + +
    + +
    +

    By default, Mini Apps seamlessly integrate with Android and iOS, allowing users to add direct shortcuts to their device’s home screen.

    +
    +

    Likewise, many popular platforms already have official Telegram bots, which allow users to comfortably access content in one app – or perform quick searches using inline mode.

    - +

    Try @GMailBot, @GitHubBot, @Bing, @YouTube, @wiki and more.

    Host Games

    -

    Using HTML5, developers can create immersive single or multi-player games that allow users to team up or compete for the highest score.

    +

    Developers can create both lightweight HTML5 Games and immersive full-screen modern games with support for detailed motion controls, location-based points of interest and dynamic hardware optimizations.

    -
    -

    Try @Gamee and @GameBot – or check out the HTML5 Games Manual to build your own.

    +

    Try some of the games in the @Gamee library – or check out the HTML5 and Mini App manuals to build your own.

    Build Social Networks

    Bots can serve as an intermediary to connect users based on shared interests, location, and more. Coordinate meetups, show local services, or help people sell second-hand items.

    @@ -135,8 +146,25 @@ +
    +

    Users can place direct shortcuts to specific mini apps on the home screen of their devices – accessing services in one tap.

    +
    +

    Monetize Your Project

    +

    Telegram offers a robust ecosystem of monetization features, allowing any bot to support its development with multiple revenue streams. Popular bots can passively earn income through Revenue Sharing from Telegram Ads, implement subscription plans for users – or offer paid content and digital products for Telegram Stars.

    +
    + +
    + +
    +

    Telegram Stars in your bot's balance can be used to increase message limits, send gifts to users or accept rewards in Toncoin.

    +

    Anything Else

    The possibilities for bots are endless – from simple scripts to complex mini apps. Whether you’re a beginner or professional programmer, you can create personalized tools with the help of the Bot Platform.

    +
    +

    All Mini Apps you build on Telegram can be highly customized to fit your brand identity, including by uploading high-quality media demos and setting a custom Loading Screen with your own logo and color palette

    +

    How Do Bots Work?

    diff --git a/data/web/blogfork.telegram.org/bots/features.html b/data/web/blogfork.telegram.org/bots/features.html index dfe5963b50..3a3b997e87 100644 --- a/data/web/blogfork.telegram.org/bots/features.html +++ b/data/web/blogfork.telegram.org/bots/features.html @@ -70,9 +70,10 @@
  • Payments
  • Web Login
  • HTML5 Games
  • -
  • Stickers
  • +
  • Stickers
  • +
  • Monetization
  • Language Support
  • Bot Management

    For even more flexibility, Web Apps support 100% custom interfaces with JavaScript.

    - +
    @@ -116,7 +117,7 @@

    Commands should be as specific as possible – for example /newlocation or /newrule is better than a /new command that then requires an additional parameter from the user like "location“ or ”rule".

    -
    @@ -133,7 +134,7 @@ width=44% />

    Bots are able to interpret free text input from users, but offering specific suggestions is often more intuitive – this is where custom keyboards can be extremely useful.

    Whenever your bot sends a message, it can display a special keyboard with predefined reply options (see ReplyKeyboardMarkup). Telegram apps that receive the message will display your keyboard to the user. Using any of the buttons will immediately send the respective text. This way you can drastically simplify and streamline user interaction with your bot.

    - +
    @@ -144,7 +145,7 @@ width=44% />

    There are times when you'd prefer to do things without sending any messages to the chat – like when a user is changing settings, toggling options or navigating search results. In such cases, you can use Inline Keyboards that are shown directly below their relevant messages.

    Unlike with custom reply keyboards, pressing buttons on inline keyboards doesn't send messages to the chat. Instead, inline keyboards support buttons that can work behind the scenes or open different interfaces: callback buttons, URL buttons, switch-to-inline buttons, game buttons and payment buttons.

    - +
    @@ -154,7 +155,7 @@ width=44% />

    In all bot chats, a menu button appears near the message field. By default, tapping this button opens a menu that can hold some or all of a bot's commands, including a short description for each. Users can then select a command from the menu without needing to type it out.

    You can set different texts of the menu button and its command descriptions for various individual users or groups of users – for example, showing translated text based on the user’s language, as explained here.

    -
    @@ -179,7 +180,7 @@ width=44% />
  • When the user selects a chat, you'll receive its identifier in a chat_shared or user_shared service message.
  • -
    @@ -200,7 +201,7 @@ width=44% />

    Having received the query, your bot can return some results. As soon as the user selects one, it is sent to the relevant chat. This way, people can request and send content from your bot in any of their chats, groups or channels.

    Remember that inline functionality has to be enabled via @BotFather, or your bot will not receive inline Updates.

    - +
    @@ -226,7 +227,7 @@ width=44% />

    Attachment Menu

    Certain bots can be added directly to a user’s attachment menu – giving them easy access to the bot in any chat. Currently, this option is restricted to certain approved bots, but may be expanded later.

    -
    @@ -236,7 +237,7 @@ width=44% />

    Integration

    -

    There are various ways of futher integrating bots with Telegram and other services.

    +

    There are various ways of further integrating bots with Telegram and other services.

    +

    Monetization

    +

    Telegram offers a robust ecosystem of monetization features, allowing any bot to support its development with multiple revenue streams.

    +

    Telegram Stars

    +

    Telegram Stars power all digital transactions between bots and users. Users can acquire Stars through in-app purchases via Apple and Google or via @PremiumBot.

    +

    Bots can use the Stars they receive to increase message limits, send gifts to users or accept rewards in Toncoin.

    +
    + +
    + +

    Digital Products

    +

    Services can use their bot to sell digital goods and services – like online courses, commissioned artwork and items in games.

    +
    + +
    + +

    Paid Media

    +

    Bots can post paid photos and videos – and users are only allowed to view the media after paying to unlock it. This functionality is available to all bots – including bot admins in channels and bots managing Telegram Business accounts.

    +
    + +
    + + +

    Subscription Plans

    +

    Developers are able to offer paid subscriptions to their bot – adding multiple tiers of content and features tailored to their audience.

    +
    +
    + +
    + +

    Revenue Sharing from Telegram Ads

    +

    Developers can participate in revenue sharing from Telegram Ads – receiving 50% of the revenue from ads that appear in the chat with their bot.

    +
    + +
    + +

    Mini Apps

    Mini Apps allow developers to create infinitely flexible interfaces that can be launched right inside Telegram – integrating seamlessly with the app and replacing any website.

    If your bot is a mini app, you can add a prominent Launch app button as well as demo videos and screenshots to the bot’s profile. To do this, go to @BotFather and set up your bot's Main Mini App.

    @@ -252,7 +297,7 @@ width=44% />

    Mini apps are covered in detail in our dedicated guide – you should read it carefully to learn the wide variety of features they can offer.

    -
    @@ -261,31 +306,20 @@ width=44% />

    Seamless Integration With Telegram

    Mini apps integrate seamlessly with Telegram – from receiving detailed theme settings to using native dialogs for reading QR codes, controlling biometrics, sharing media directly to stories and more.

    When opened from a direct link in a group, mini apps can also use the chat_instance parameter to track of the current context, supporting shared usage by multiple chat members – to create live whiteboards, group orders, multiplayer games and much more.

    -

    Sharing from Mini Apps to Stories

    -

    Any media created by the mini app, like whiteboard snapshots, leaderboards and AI-generated videos can be opened with the native story editor via the shareToStory method – for users to share as a Telegram Story right from the mini app.

    -
    - -
    - -
    -

    Mini apps also receive a number of events, allowing them to instantly react to actions by the user. You can learn more about which events are available here.

    -

    Mini App Previews

    Developers can upload screenshots and video demos of their mini app right from the bot's profile page – giving users an overview of the app's features and functionality. These media previews will be shown to any user who views your app – like in the Mini App Store or via Search.

    - +

    Previews support multiple languages – so you can upload translated versions of your previews that will be shown to users based on their app language.

    Mini App Store

    -

    More than 500 million out of Telegram's 950 million users interact with mini apps every month. Succesful mini apps have the chance to be highlighted in the Telegram Mini App Store – appearing for all users in the 'Apps' tab of Search.

    +

    More than 500 million out of Telegram's 950 million users interact with mini apps every month. Successful mini apps have the chance to be highlighted in the Telegram Mini App Store – appearing for all users in the 'Apps' tab of Search.

    Featured mini apps are chosen based on how they enrich the Telegram ecosystem. To increase the chances of being featured, you must enable the Main Mini App in @BotFather, upload high-quality media demos showcasing your app to your bot's profile and accept payments in Telegram Stars.

    -
    @@ -293,8 +327,86 @@ width=44% />

    Check out our documentation to learn more about enabling Main Mini Apps and accepting payments in Stars.

    +

    Home Screen Shortcuts

    +

    Users can place direct shortcuts to specific mini apps on the home screen of their devices – accessing their favorite games and services in one tap.

    +
    +
    + +
    + +

    Customizable Loading Screens

    +

    The loading screen of mini apps can be customized in @Botfather – where developers can add their own icon and set specific colors for both light and dark themes.

    +
    +
    + +
    + +
    +

    To customize your loading screen, go to @Botfather > /mybots > Select bot > Bot Settings > Configure Mini App > Configure Splash Screen. You can tap on Open Splash Screen Preview to see the final result.

    +
    +

    Full-Screen Mode

    +

    Mini apps are able to use the entire screen in portrait or landscape orientation – allowing for immersive games and media with expanded gestures and interfaces.

    +
    +
    + +
    + +

    Setting Emoji Status

    +

    Users can set an emoji status inside mini apps or give an app permission to update it automatically.

    +

    Developers can also integrate APIs from other services or request geolocation access – instantly changing a user's status when they start a game 🎮 or leave the office 💼.

    +
    + +
    + +

    Sharing Media

    +

    Media generated in mini apps can be shared in any chat – letting users effortlessly send referral codes and custom images to contacts, groups and channels. Alternatively, users can download it with a native popup.

    +
    + +
    + +

    Sharing from Mini Apps to Stories

    +

    Any media created by the mini app, like whiteboard snapshots, leaderboards and AI-generated videos can be opened with the native story editor via the shareToStory method – for users to share as a Telegram Story right from the mini app.

    +
    + +
    + +
    +

    Mini apps also receive a number of events, allowing them to instantly react to actions by the user. You can learn more about which events are available here.

    +
    +

    Geolocation Access

    +

    Mini apps are able to receive location permissions from users – giving developers the ability to make location-based games and interactive maps for events.

    +
    +
    + +
    + +

    Device Motion Tracking

    +

    Mini Apps can request acceleration, orientation and rotation data from devices in real time – unlocking support for motion controls and VR experiences.

    +
    +
    + +
    + +

    Device Hardware Info

    +

    A user's device can send basic hardware info to mini apps, such as its processing power and memory capacity. Mini apps can then use this to optimize graphics and automatically adjust settings for the smoothest experience.

    Bots for Business

    -

    Bots can enable Business Mode, allowing Telegram Business subscribers to connect them to their account – to streamline and automate private chat management and interactions with their clients.

    +

    Bots can enable Business Mode, allowing Telegram Business subscribers to connect them to their account – streamlining and automating private chat management and interactions with their clients.

    The account owner can specify which chats your bot can access – within those chats, the bot will receive all updates normally supported by the Bot API, except messages sent by itself and other bots. Depending on the business connection settings, your bot may also be able to send messages and do other actions on behalf of the account owner in chats that were active in the last 24h.

    Here is a quick start guide to integrate your bot with Telegram Business:

      @@ -305,8 +417,8 @@ width=44% />
    • If allowed to, use the business_connection_id field in sendMessage, sendChatAction and other send methods to communicate on behalf of the Business user.

    Users who connect your bot to their account will see a quick action bar at the top of each managed chat – tapping on “Manage Bot” will redirect them to your bot, which will receive a deep link message in the format /start bizChat<user_chat_id>.

    -
    -
    +
    +

    Users can place direct shortcuts to specific mini apps on the home screen of their devices – accessing services in one tap.

    +
    +

    Monetize Your Project

    +

    Telegram offers a robust ecosystem of monetization features, allowing any bot to support its development with multiple revenue streams. Popular bots can passively earn income through Revenue Sharing from Telegram Ads, implement subscription plans for users – or offer paid content and digital products for Telegram Stars.

    +
    + +
    + +
    +

    Telegram Stars in your bot's balance can be used to increase message limits, send gifts to users or accept rewards in Toncoin.

    +

    Anything Else

    The possibilities for bots are endless – from simple scripts to complex mini apps. Whether you’re a beginner or professional programmer, you can create personalized tools with the help of the Bot Platform.

    +
    +

    All Mini Apps you build on Telegram can be highly customized to fit your brand identity, including by uploading high-quality media demos and setting a custom Loading Screen with your own logo and color palette

    +

    How Do Bots Work?

    diff --git a/data/web/core.telegram.org/bots/features.html b/data/web/core.telegram.org/bots/features.html index b770925079..164ccea64a 100644 --- a/data/web/core.telegram.org/bots/features.html +++ b/data/web/core.telegram.org/bots/features.html @@ -70,9 +70,10 @@
  • Payments
  • Web Login
  • HTML5 Games
  • -
  • Stickers
  • +
  • Stickers
  • +
  • Monetization
  • Language Support
  • Bot Management

    For even more flexibility, Web Apps support 100% custom interfaces with JavaScript.

    - +
    @@ -116,7 +117,7 @@

    Commands should be as specific as possible – for example /newlocation or /newrule is better than a /new command that then requires an additional parameter from the user like "location“ or ”rule".

    -
    @@ -133,7 +134,7 @@ width=44% />

    Bots are able to interpret free text input from users, but offering specific suggestions is often more intuitive – this is where custom keyboards can be extremely useful.

    Whenever your bot sends a message, it can display a special keyboard with predefined reply options (see ReplyKeyboardMarkup). Telegram apps that receive the message will display your keyboard to the user. Using any of the buttons will immediately send the respective text. This way you can drastically simplify and streamline user interaction with your bot.

    - +
    @@ -144,7 +145,7 @@ width=44% />

    There are times when you'd prefer to do things without sending any messages to the chat – like when a user is changing settings, toggling options or navigating search results. In such cases, you can use Inline Keyboards that are shown directly below their relevant messages.

    Unlike with custom reply keyboards, pressing buttons on inline keyboards doesn't send messages to the chat. Instead, inline keyboards support buttons that can work behind the scenes or open different interfaces: callback buttons, URL buttons, switch-to-inline buttons, game buttons and payment buttons.

    - +
    @@ -154,7 +155,7 @@ width=44% />

    In all bot chats, a menu button appears near the message field. By default, tapping this button opens a menu that can hold some or all of a bot's commands, including a short description for each. Users can then select a command from the menu without needing to type it out.

    You can set different texts of the menu button and its command descriptions for various individual users or groups of users – for example, showing translated text based on the user’s language, as explained here.

    -
    @@ -179,7 +180,7 @@ width=44% />
  • When the user selects a chat, you'll receive its identifier in a chat_shared or user_shared service message.
  • -
    @@ -200,7 +201,7 @@ width=44% />

    Having received the query, your bot can return some results. As soon as the user selects one, it is sent to the relevant chat. This way, people can request and send content from your bot in any of their chats, groups or channels.

    Remember that inline functionality has to be enabled via @BotFather, or your bot will not receive inline Updates.

    - +
    @@ -226,7 +227,7 @@ width=44% />

    Attachment Menu

    Certain bots can be added directly to a user’s attachment menu – giving them easy access to the bot in any chat. Currently, this option is restricted to certain approved bots, but may be expanded later.

    -
    @@ -236,7 +237,7 @@ width=44% />

    Integration

    -

    There are various ways of futher integrating bots with Telegram and other services.

    +

    There are various ways of further integrating bots with Telegram and other services.

    +

    Monetization

    +

    Telegram offers a robust ecosystem of monetization features, allowing any bot to support its development with multiple revenue streams.

    +

    Telegram Stars

    +

    Telegram Stars power all digital transactions between bots and users. Users can acquire Stars through in-app purchases via Apple and Google or via @PremiumBot.

    +

    Bots can use the Stars they receive to increase message limits, send gifts to users or accept rewards in Toncoin.

    +
    + +
    + +

    Digital Products

    +

    Services can use their bot to sell digital goods and services – like online courses, commissioned artwork and items in games.

    +
    + +
    + +

    Paid Media

    +

    Bots can post paid photos and videos – and users are only allowed to view the media after paying to unlock it. This functionality is available to all bots – including bot admins in channels and bots managing Telegram Business accounts.

    +
    + +
    + + +

    Subscription Plans

    +

    Developers are able to offer paid subscriptions to their bot – adding multiple tiers of content and features tailored to their audience.

    +
    +
    + +
    + +

    Revenue Sharing from Telegram Ads

    +

    Developers can participate in revenue sharing from Telegram Ads – receiving 50% of the revenue from ads that appear in the chat with their bot.

    +
    + +
    + +

    Mini Apps

    Mini Apps allow developers to create infinitely flexible interfaces that can be launched right inside Telegram – integrating seamlessly with the app and replacing any website.

    If your bot is a mini app, you can add a prominent Launch app button as well as demo videos and screenshots to the bot’s profile. To do this, go to @BotFather and set up your bot's Main Mini App.

    @@ -252,7 +297,7 @@ width=44% />

    Mini apps are covered in detail in our dedicated guide – you should read it carefully to learn the wide variety of features they can offer.

    -
    @@ -261,31 +306,20 @@ width=44% />

    Seamless Integration With Telegram

    Mini apps integrate seamlessly with Telegram – from receiving detailed theme settings to using native dialogs for reading QR codes, controlling biometrics, sharing media directly to stories and more.

    When opened from a direct link in a group, mini apps can also use the chat_instance parameter to track of the current context, supporting shared usage by multiple chat members – to create live whiteboards, group orders, multiplayer games and much more.

    -

    Sharing from Mini Apps to Stories

    -

    Any media created by the mini app, like whiteboard snapshots, leaderboards and AI-generated videos can be opened with the native story editor via the shareToStory method – for users to share as a Telegram Story right from the mini app.

    -
    - -
    - -
    -

    Mini apps also receive a number of events, allowing them to instantly react to actions by the user. You can learn more about which events are available here.

    -

    Mini App Previews

    Developers can upload screenshots and video demos of their mini app right from the bot's profile page – giving users an overview of the app's features and functionality. These media previews will be shown to any user who views your app – like in the Mini App Store or via Search.

    - +

    Previews support multiple languages – so you can upload translated versions of your previews that will be shown to users based on their app language.

    Mini App Store

    -

    More than 500 million out of Telegram's 950 million users interact with mini apps every month. Succesful mini apps have the chance to be highlighted in the Telegram Mini App Store – appearing for all users in the 'Apps' tab of Search.

    +

    More than 500 million out of Telegram's 950 million users interact with mini apps every month. Successful mini apps have the chance to be highlighted in the Telegram Mini App Store – appearing for all users in the 'Apps' tab of Search.

    Featured mini apps are chosen based on how they enrich the Telegram ecosystem. To increase the chances of being featured, you must enable the Main Mini App in @BotFather, upload high-quality media demos showcasing your app to your bot's profile and accept payments in Telegram Stars.

    -
    @@ -293,8 +327,86 @@ width=44% />

    Check out our documentation to learn more about enabling Main Mini Apps and accepting payments in Stars.

    +

    Home Screen Shortcuts

    +

    Users can place direct shortcuts to specific mini apps on the home screen of their devices – accessing their favorite games and services in one tap.

    +
    +
    + +
    + +

    Customizable Loading Screens

    +

    The loading screen of mini apps can be customized in @Botfather – where developers can add their own icon and set specific colors for both light and dark themes.

    +
    +
    + +
    + +
    +

    To customize your loading screen, go to @Botfather > /mybots > Select bot > Bot Settings > Configure Mini App > Configure Splash Screen. You can tap on Open Splash Screen Preview to see the final result.

    +
    +

    Full-Screen Mode

    +

    Mini apps are able to use the entire screen in portrait or landscape orientation – allowing for immersive games and media with expanded gestures and interfaces.

    +
    +
    + +
    + +

    Setting Emoji Status

    +

    Users can set an emoji status inside mini apps or give an app permission to update it automatically.

    +

    Developers can also integrate APIs from other services or request geolocation access – instantly changing a user's status when they start a game 🎮 or leave the office 💼.

    +
    + +
    + +

    Sharing Media

    +

    Media generated in mini apps can be shared in any chat – letting users effortlessly send referral codes and custom images to contacts, groups and channels. Alternatively, users can download it with a native popup.

    +
    + +
    + +

    Sharing from Mini Apps to Stories

    +

    Any media created by the mini app, like whiteboard snapshots, leaderboards and AI-generated videos can be opened with the native story editor via the shareToStory method – for users to share as a Telegram Story right from the mini app.

    +
    + +
    + +
    +

    Mini apps also receive a number of events, allowing them to instantly react to actions by the user. You can learn more about which events are available here.

    +
    +

    Geolocation Access

    +

    Mini apps are able to receive location permissions from users – giving developers the ability to make location-based games and interactive maps for events.

    +
    +
    + +
    + +

    Device Motion Tracking

    +

    Mini Apps can request acceleration, orientation and rotation data from devices in real time – unlocking support for motion controls and VR experiences.

    +
    +
    + +
    + +

    Device Hardware Info

    +

    A user's device can send basic hardware info to mini apps, such as its processing power and memory capacity. Mini apps can then use this to optimize graphics and automatically adjust settings for the smoothest experience.

    Bots for Business

    -

    Bots can enable Business Mode, allowing Telegram Business subscribers to connect them to their account – to streamline and automate private chat management and interactions with their clients.

    +

    Bots can enable Business Mode, allowing Telegram Business subscribers to connect them to their account – streamlining and automating private chat management and interactions with their clients.

    The account owner can specify which chats your bot can access – within those chats, the bot will receive all updates normally supported by the Bot API, except messages sent by itself and other bots. Depending on the business connection settings, your bot may also be able to send messages and do other actions on behalf of the account owner in chats that were active in the last 24h.

    Here is a quick start guide to integrate your bot with Telegram Business:

      @@ -305,8 +417,8 @@ width=44% />
    • If allowed to, use the business_connection_id field in sendMessage, sendChatAction and other send methods to communicate on behalf of the Business user.

    Users who connect your bot to their account will see a quick action bar at the top of each managed chat – tapping on “Manage Bot” will redirect them to your bot, which will receive a deep link message in the format /start bizChat<user_chat_id>.

    -
    -
    +
    +

    Users can place direct shortcuts to specific mini apps on the home screen of their devices – accessing services in one tap.

    +
    +

    Monetize Your Project

    +

    Telegram offers a robust ecosystem of monetization features, allowing any bot to support its development with multiple revenue streams. Popular bots can passively earn income through Revenue Sharing from Telegram Ads, implement subscription plans for users – or offer paid content and digital products for Telegram Stars.

    +
    + +
    + +
    +

    Telegram Stars in your bot's balance can be used to increase message limits, send gifts to users or accept rewards in Toncoin.

    +

    Anything Else

    The possibilities for bots are endless – from simple scripts to complex mini apps. Whether you’re a beginner or professional programmer, you can create personalized tools with the help of the Bot Platform.

    +
    +

    All Mini Apps you build on Telegram can be highly customized to fit your brand identity, including by uploading high-quality media demos and setting a custom Loading Screen with your own logo and color palette

    +

    How Do Bots Work?

    diff --git a/data/web/telegram.org.html b/data/web/telegram.org.html index e10500ad85..021ab0654e 100644 --- a/data/web/telegram.org.html +++ b/data/web/telegram.org.html @@ -50,15 +50,15 @@ @@ -109,20 +109,20 @@ Recent News diff --git a/data/web/telegram.org/api.html b/data/web/telegram.org/api.html index 243258e103..f5a4edb384 100644 --- a/data/web/telegram.org/api.html +++ b/data/web/telegram.org/api.html @@ -50,15 +50,15 @@ @@ -109,20 +109,20 @@ Recent News diff --git a/data/web/telegram.org/blog.html b/data/web/telegram.org/blog.html index 8ec91a81fc..82423406c4 100644 --- a/data/web/telegram.org/blog.html +++ b/data/web/telegram.org/blog.html @@ -46,7 +46,14 @@

    Telegram News

    -
    diff --git a/data/web/telegram.org/blog/apple-watch.html b/data/web/telegram.org/blog/apple-watch.html index fc63cb5c3f..7924cfd82d 100644 --- a/data/web/telegram.org/blog/apple-watch.html +++ b/data/web/telegram.org/blog/apple-watch.html @@ -49,7 +49,10 @@ @@ -120,7 +120,14 @@ Other News diff --git a/data/web/telegram.org/blog/archive-and-new-design.html b/data/web/telegram.org/blog/archive-and-new-design.html index 37bef4306b..38210737d9 100644 --- a/data/web/telegram.org/blog/archive-and-new-design.html +++ b/data/web/telegram.org/blog/archive-and-new-design.html @@ -49,7 +49,10 @@ @@ -213,7 +213,14 @@ Other News diff --git a/data/web/telegram.org/blog/autodelete-inv2.html b/data/web/telegram.org/blog/autodelete-inv2.html index aaaca06dfc..9218c31868 100644 --- a/data/web/telegram.org/blog/autodelete-inv2.html +++ b/data/web/telegram.org/blog/autodelete-inv2.html @@ -49,7 +49,10 @@ @@ -192,7 +192,14 @@ Other News diff --git a/data/web/telegram.org/blog/autoplay.html b/data/web/telegram.org/blog/autoplay.html index cc46bf313b..7da6127b7b 100644 --- a/data/web/telegram.org/blog/autoplay.html +++ b/data/web/telegram.org/blog/autoplay.html @@ -49,7 +49,10 @@ @@ -140,7 +140,14 @@ Other News diff --git a/data/web/telegram.org/blog/backgrounds-2-0.html b/data/web/telegram.org/blog/backgrounds-2-0.html index 45040580bf..5a1f9181b3 100644 --- a/data/web/telegram.org/blog/backgrounds-2-0.html +++ b/data/web/telegram.org/blog/backgrounds-2-0.html @@ -49,7 +49,10 @@ @@ -126,7 +126,14 @@ Other News diff --git a/data/web/telegram.org/blog/bot-revolution.html b/data/web/telegram.org/blog/bot-revolution.html index 3ae34fe850..2ccb47eebe 100644 --- a/data/web/telegram.org/blog/bot-revolution.html +++ b/data/web/telegram.org/blog/bot-revolution.html @@ -49,7 +49,10 @@ @@ -174,7 +174,14 @@ Other News diff --git a/data/web/telegram.org/blog/bots-2-0.html b/data/web/telegram.org/blog/bots-2-0.html index f064260625..2285166e3a 100644 --- a/data/web/telegram.org/blog/bots-2-0.html +++ b/data/web/telegram.org/blog/bots-2-0.html @@ -49,7 +49,10 @@ @@ -155,7 +155,14 @@ Other News diff --git a/data/web/telegram.org/blog/cache-and-stickers.html b/data/web/telegram.org/blog/cache-and-stickers.html index 112ed4a1cc..5f6534b457 100644 --- a/data/web/telegram.org/blog/cache-and-stickers.html +++ b/data/web/telegram.org/blog/cache-and-stickers.html @@ -49,7 +49,10 @@ @@ -126,7 +126,14 @@ Other News diff --git a/data/web/telegram.org/blog/calls-and-bots.html b/data/web/telegram.org/blog/calls-and-bots.html index d2b48dee29..bf7317da06 100644 --- a/data/web/telegram.org/blog/calls-and-bots.html +++ b/data/web/telegram.org/blog/calls-and-bots.html @@ -49,7 +49,10 @@ @@ -163,7 +163,14 @@ The Telegram Team* Other News diff --git a/data/web/telegram.org/blog/calls.html b/data/web/telegram.org/blog/calls.html index 6448128b03..09dabb1e17 100644 --- a/data/web/telegram.org/blog/calls.html +++ b/data/web/telegram.org/blog/calls.html @@ -49,7 +49,10 @@ @@ -161,7 +161,14 @@ Other News diff --git a/data/web/telegram.org/blog/captions-places.html b/data/web/telegram.org/blog/captions-places.html index d6a0580f46..daed9f3fb0 100644 --- a/data/web/telegram.org/blog/captions-places.html +++ b/data/web/telegram.org/blog/captions-places.html @@ -49,7 +49,10 @@ @@ -139,7 +139,14 @@ Other News diff --git a/data/web/telegram.org/blog/channel-stories.html b/data/web/telegram.org/blog/channel-stories.html index b9b8d03f3f..3ce9aa7727 100644 --- a/data/web/telegram.org/blog/channel-stories.html +++ b/data/web/telegram.org/blog/channel-stories.html @@ -49,7 +49,10 @@ @@ -177,7 +177,14 @@ Other News diff --git a/data/web/telegram.org/blog/channels-2-0.html b/data/web/telegram.org/blog/channels-2-0.html index e28de987b8..cc9eed142a 100644 --- a/data/web/telegram.org/blog/channels-2-0.html +++ b/data/web/telegram.org/blog/channels-2-0.html @@ -49,7 +49,10 @@ @@ -141,7 +141,14 @@ Other News diff --git a/data/web/telegram.org/blog/channels.html b/data/web/telegram.org/blog/channels.html index abb0918ebb..4691b4cc30 100644 --- a/data/web/telegram.org/blog/channels.html +++ b/data/web/telegram.org/blog/channels.html @@ -49,7 +49,10 @@ @@ -119,7 +119,14 @@ Other News diff --git a/data/web/telegram.org/blog/chat-themes-interactive-emoji-read-receipts.html b/data/web/telegram.org/blog/chat-themes-interactive-emoji-read-receipts.html index 2b3f57c362..c91bd66fc3 100644 --- a/data/web/telegram.org/blog/chat-themes-interactive-emoji-read-receipts.html +++ b/data/web/telegram.org/blog/chat-themes-interactive-emoji-read-receipts.html @@ -49,7 +49,10 @@ @@ -190,7 +190,14 @@ This way you can quickly see how to [start a Secret Chat](/) on iOS or show one Other News diff --git a/data/web/telegram.org/blog/contacts-local-groups.html b/data/web/telegram.org/blog/contacts-local-groups.html index 03290d4182..a96e4528a1 100644 --- a/data/web/telegram.org/blog/contacts-local-groups.html +++ b/data/web/telegram.org/blog/contacts-local-groups.html @@ -49,7 +49,10 @@ @@ -167,7 +167,14 @@ Other News diff --git a/data/web/telegram.org/blog/coronavirus.html b/data/web/telegram.org/blog/coronavirus.html index b46496fe7a..5b09373094 100644 --- a/data/web/telegram.org/blog/coronavirus.html +++ b/data/web/telegram.org/blog/coronavirus.html @@ -49,7 +49,10 @@ @@ -149,7 +149,14 @@ Other News diff --git a/data/web/telegram.org/blog/crowdsourcing-a-more-secure-future.html b/data/web/telegram.org/blog/crowdsourcing-a-more-secure-future.html index 715cd9edac..7beeb9ec28 100644 --- a/data/web/telegram.org/blog/crowdsourcing-a-more-secure-future.html +++ b/data/web/telegram.org/blog/crowdsourcing-a-more-secure-future.html @@ -49,7 +49,10 @@ @@ -110,7 +110,14 @@ Other News diff --git a/data/web/telegram.org/blog/cryptocontest-ends.html b/data/web/telegram.org/blog/cryptocontest-ends.html index e89eb769f9..4e5fac717c 100644 --- a/data/web/telegram.org/blog/cryptocontest-ends.html +++ b/data/web/telegram.org/blog/cryptocontest-ends.html @@ -49,7 +49,10 @@ @@ -113,7 +113,14 @@ Other News diff --git a/data/web/telegram.org/blog/cryptocontest.html b/data/web/telegram.org/blog/cryptocontest.html index 50a305d147..a251f7d573 100644 --- a/data/web/telegram.org/blog/cryptocontest.html +++ b/data/web/telegram.org/blog/cryptocontest.html @@ -49,7 +49,10 @@ @@ -119,7 +119,14 @@ Other News diff --git a/data/web/telegram.org/blog/custom-emoji.html b/data/web/telegram.org/blog/custom-emoji.html index 6221a58183..a2adac52f3 100644 --- a/data/web/telegram.org/blog/custom-emoji.html +++ b/data/web/telegram.org/blog/custom-emoji.html @@ -49,7 +49,10 @@ @@ -207,7 +207,14 @@ Telegram's expressive **animated emoji** can now be included in the text of mess Other News diff --git a/data/web/telegram.org/blog/desktop-1-0.html b/data/web/telegram.org/blog/desktop-1-0.html index 18d4a6ff4b..7aeb7a460f 100644 --- a/data/web/telegram.org/blog/desktop-1-0.html +++ b/data/web/telegram.org/blog/desktop-1-0.html @@ -49,7 +49,10 @@ @@ -145,7 +145,14 @@ Other News diff --git a/data/web/telegram.org/blog/desktop-compact.html b/data/web/telegram.org/blog/desktop-compact.html index 6ba8856bc6..f361e55672 100644 --- a/data/web/telegram.org/blog/desktop-compact.html +++ b/data/web/telegram.org/blog/desktop-compact.html @@ -49,7 +49,10 @@ @@ -108,7 +108,14 @@ Other News diff --git a/data/web/telegram.org/blog/discover-stickers-and-more.html b/data/web/telegram.org/blog/discover-stickers-and-more.html index f2eaaf350c..5226f45299 100644 --- a/data/web/telegram.org/blog/discover-stickers-and-more.html +++ b/data/web/telegram.org/blog/discover-stickers-and-more.html @@ -49,7 +49,10 @@ @@ -141,7 +141,14 @@ Other News diff --git a/data/web/telegram.org/blog/downloads-attachments-streaming.html b/data/web/telegram.org/blog/downloads-attachments-streaming.html index 49cef192e7..cfe65b569e 100644 --- a/data/web/telegram.org/blog/downloads-attachments-streaming.html +++ b/data/web/telegram.org/blog/downloads-attachments-streaming.html @@ -49,7 +49,10 @@ @@ -205,7 +205,14 @@ Other News diff --git a/data/web/telegram.org/blog/drafts.html b/data/web/telegram.org/blog/drafts.html index 69c0edc306..54de06a0d4 100644 --- a/data/web/telegram.org/blog/drafts.html +++ b/data/web/telegram.org/blog/drafts.html @@ -49,7 +49,10 @@ @@ -137,7 +137,14 @@ Other News diff --git a/data/web/telegram.org/blog/dynamic-video-quality-and-more.html b/data/web/telegram.org/blog/dynamic-video-quality-and-more.html index 2758cdee7a..9721e15ce6 100644 --- a/data/web/telegram.org/blog/dynamic-video-quality-and-more.html +++ b/data/web/telegram.org/blog/dynamic-video-quality-and-more.html @@ -49,7 +49,10 @@ @@ -208,7 +208,14 @@ Other News diff --git a/data/web/telegram.org/blog/edit.html b/data/web/telegram.org/blog/edit.html index 7c08f652d6..ebb7d99500 100644 --- a/data/web/telegram.org/blog/edit.html +++ b/data/web/telegram.org/blog/edit.html @@ -49,7 +49,10 @@ @@ -140,7 +140,14 @@ Other News diff --git a/data/web/telegram.org/blog/encrypted-cdns.html b/data/web/telegram.org/blog/encrypted-cdns.html index 7c0d970028..c87fb1e0a2 100644 --- a/data/web/telegram.org/blog/encrypted-cdns.html +++ b/data/web/telegram.org/blog/encrypted-cdns.html @@ -49,7 +49,10 @@ @@ -123,7 +123,14 @@ Other News diff --git a/data/web/telegram.org/blog/export-and-more.html b/data/web/telegram.org/blog/export-and-more.html index 122fd428d8..9dad84e863 100644 --- a/data/web/telegram.org/blog/export-and-more.html +++ b/data/web/telegram.org/blog/export-and-more.html @@ -49,7 +49,10 @@ @@ -133,7 +133,14 @@ To name just a few projects that integrated Telegram Passport: Other News
    diff --git a/data/web/telegram.org/blog/february2024.html b/data/web/telegram.org/blog/february2024.html index 3221f5321d..c45a3bb0d2 100644 --- a/data/web/telegram.org/blog/february2024.html +++ b/data/web/telegram.org/blog/february2024.html @@ -49,7 +49,10 @@ @@ -171,7 +171,14 @@ Other News diff --git a/data/web/telegram.org/blog/files-on-steroids.html b/data/web/telegram.org/blog/files-on-steroids.html index b8975d3de4..6f53c0edda 100644 --- a/data/web/telegram.org/blog/files-on-steroids.html +++ b/data/web/telegram.org/blog/files-on-steroids.html @@ -49,7 +49,10 @@ @@ -135,7 +135,14 @@ Other News diff --git a/data/web/telegram.org/blog/filters-anonymous-admins-comments.html b/data/web/telegram.org/blog/filters-anonymous-admins-comments.html index e30be86d2f..f1d12f5b73 100644 --- a/data/web/telegram.org/blog/filters-anonymous-admins-comments.html +++ b/data/web/telegram.org/blog/filters-anonymous-admins-comments.html @@ -49,7 +49,10 @@ @@ -154,7 +154,14 @@ Other News diff --git a/data/web/telegram.org/blog/folders.html b/data/web/telegram.org/blog/folders.html index a1c2d10974..15d82ea602 100644 --- a/data/web/telegram.org/blog/folders.html +++ b/data/web/telegram.org/blog/folders.html @@ -49,7 +49,10 @@ @@ -196,7 +196,14 @@ If you have a channel with more than 1000 50 subscribers, you can Other News diff --git a/data/web/telegram.org/blog/games.html b/data/web/telegram.org/blog/games.html index 25538c8a78..31511427f1 100644 --- a/data/web/telegram.org/blog/games.html +++ b/data/web/telegram.org/blog/games.html @@ -49,7 +49,10 @@ @@ -159,7 +159,14 @@ Other News diff --git a/data/web/telegram.org/blog/gif-revolution.html b/data/web/telegram.org/blog/gif-revolution.html index bf0ea928a3..a9d36c296e 100644 --- a/data/web/telegram.org/blog/gif-revolution.html +++ b/data/web/telegram.org/blog/gif-revolution.html @@ -49,7 +49,10 @@ @@ -119,7 +119,14 @@ Other News diff --git a/data/web/telegram.org/blog/gifs.html b/data/web/telegram.org/blog/gifs.html index ef5d2291a0..91e1459761 100644 --- a/data/web/telegram.org/blog/gifs.html +++ b/data/web/telegram.org/blog/gifs.html @@ -49,7 +49,10 @@ @@ -118,7 +118,14 @@ Other News diff --git a/data/web/telegram.org/blog/gifts-verification-platform.html b/data/web/telegram.org/blog/gifts-verification-platform.html index 239b26ebd9..fe5a2d9261 100644 --- a/data/web/telegram.org/blog/gifts-verification-platform.html +++ b/data/web/telegram.org/blog/gifts-verification-platform.html @@ -49,7 +49,10 @@ @@ -189,7 +189,14 @@ Other News diff --git a/data/web/telegram.org/blog/giveaways.html b/data/web/telegram.org/blog/giveaways.html index e0f3980f73..0b1c6709b9 100644 --- a/data/web/telegram.org/blog/giveaways.html +++ b/data/web/telegram.org/blog/giveaways.html @@ -49,7 +49,10 @@ @@ -149,7 +149,14 @@ Other News diff --git a/data/web/telegram.org/blog/group-video-calls.html b/data/web/telegram.org/blog/group-video-calls.html index bb53bbf34d..eaa45a34c3 100644 --- a/data/web/telegram.org/blog/group-video-calls.html +++ b/data/web/telegram.org/blog/group-video-calls.html @@ -49,7 +49,10 @@ @@ -157,7 +157,14 @@ Other News diff --git a/data/web/telegram.org/blog/hidden-media-zero-storage-profile-pics.html b/data/web/telegram.org/blog/hidden-media-zero-storage-profile-pics.html index 9e7b5de8c6..fba3cd94d4 100644 --- a/data/web/telegram.org/blog/hidden-media-zero-storage-profile-pics.html +++ b/data/web/telegram.org/blog/hidden-media-zero-storage-profile-pics.html @@ -49,7 +49,10 @@ @@ -231,7 +231,14 @@ Other News diff --git a/data/web/telegram.org/blog/infinite-reactions-statuses.html b/data/web/telegram.org/blog/infinite-reactions-statuses.html index b576307603..48d25292b9 100644 --- a/data/web/telegram.org/blog/infinite-reactions-statuses.html +++ b/data/web/telegram.org/blog/infinite-reactions-statuses.html @@ -49,7 +49,10 @@ @@ -194,7 +194,14 @@ Other News diff --git a/data/web/telegram.org/blog/inline-bots.html b/data/web/telegram.org/blog/inline-bots.html index 7668bb6197..4e3adc4dd6 100644 --- a/data/web/telegram.org/blog/inline-bots.html +++ b/data/web/telegram.org/blog/inline-bots.html @@ -49,7 +49,10 @@ @@ -129,7 +129,14 @@ Other News diff --git a/data/web/telegram.org/blog/instant-camera.html b/data/web/telegram.org/blog/instant-camera.html index d765391360..f6dfd7e16d 100644 --- a/data/web/telegram.org/blog/instant-camera.html +++ b/data/web/telegram.org/blog/instant-camera.html @@ -49,7 +49,10 @@ @@ -124,7 +124,14 @@ Other News diff --git a/data/web/telegram.org/blog/instant-view-contest-200K.html b/data/web/telegram.org/blog/instant-view-contest-200K.html index 09fcad9dc9..72ffc48978 100644 --- a/data/web/telegram.org/blog/instant-view-contest-200K.html +++ b/data/web/telegram.org/blog/instant-view-contest-200K.html @@ -49,7 +49,10 @@ @@ -168,7 +168,14 @@ Other News diff --git a/data/web/telegram.org/blog/instant-view.html b/data/web/telegram.org/blog/instant-view.html index 7ba5a363e8..e366ce1ecc 100644 --- a/data/web/telegram.org/blog/instant-view.html +++ b/data/web/telegram.org/blog/instant-view.html @@ -49,7 +49,10 @@ @@ -163,7 +163,14 @@ Other News diff --git a/data/web/telegram.org/blog/invite-links.html b/data/web/telegram.org/blog/invite-links.html index f927131c7a..b8e246a107 100644 --- a/data/web/telegram.org/blog/invite-links.html +++ b/data/web/telegram.org/blog/invite-links.html @@ -49,7 +49,10 @@ @@ -112,7 +112,14 @@ Other News diff --git a/data/web/telegram.org/blog/link-preview.html b/data/web/telegram.org/blog/link-preview.html index 6ea7861f77..7310b80fcd 100644 --- a/data/web/telegram.org/blog/link-preview.html +++ b/data/web/telegram.org/blog/link-preview.html @@ -49,7 +49,10 @@ @@ -112,7 +112,14 @@ Other News diff --git a/data/web/telegram.org/blog/live-locations.html b/data/web/telegram.org/blog/live-locations.html index 4aa0f83bb3..126727b5ba 100644 --- a/data/web/telegram.org/blog/live-locations.html +++ b/data/web/telegram.org/blog/live-locations.html @@ -49,7 +49,10 @@ @@ -138,7 +138,14 @@ Other News diff --git a/data/web/telegram.org/blog/live-streams-forwarding-next-channel.html b/data/web/telegram.org/blog/live-streams-forwarding-next-channel.html index 42d3f8d628..b1f967d206 100644 --- a/data/web/telegram.org/blog/live-streams-forwarding-next-channel.html +++ b/data/web/telegram.org/blog/live-streams-forwarding-next-channel.html @@ -49,7 +49,10 @@ @@ -178,7 +178,14 @@ Other News diff --git a/data/web/telegram.org/blog/login.html b/data/web/telegram.org/blog/login.html index e417b926d7..158d8d5e91 100644 --- a/data/web/telegram.org/blog/login.html +++ b/data/web/telegram.org/blog/login.html @@ -49,7 +49,10 @@ @@ -152,7 +152,14 @@ Other News diff --git a/data/web/telegram.org/blog/masks.html b/data/web/telegram.org/blog/masks.html index 7498d5e3c1..985a3ef7c5 100644 --- a/data/web/telegram.org/blog/masks.html +++ b/data/web/telegram.org/blog/masks.html @@ -49,7 +49,10 @@ @@ -143,7 +143,14 @@ Other News diff --git a/data/web/telegram.org/blog/message-effects-and-more.html b/data/web/telegram.org/blog/message-effects-and-more.html index 604f62fa77..04da337e54 100644 --- a/data/web/telegram.org/blog/message-effects-and-more.html +++ b/data/web/telegram.org/blog/message-effects-and-more.html @@ -49,7 +49,10 @@ @@ -173,7 +173,14 @@ Other News diff --git a/data/web/telegram.org/blog/mini-app-bar-paid-media-and-more.html b/data/web/telegram.org/blog/mini-app-bar-paid-media-and-more.html index 034cb11e7e..d7d93fe716 100644 --- a/data/web/telegram.org/blog/mini-app-bar-paid-media-and-more.html +++ b/data/web/telegram.org/blog/mini-app-bar-paid-media-and-more.html @@ -49,7 +49,10 @@ @@ -194,7 +194,14 @@ Other News diff --git a/data/web/telegram.org/blog/moar-stickers.html b/data/web/telegram.org/blog/moar-stickers.html index 724e0c43df..f1bbf6569e 100644 --- a/data/web/telegram.org/blog/moar-stickers.html +++ b/data/web/telegram.org/blog/moar-stickers.html @@ -49,7 +49,10 @@ @@ -238,7 +238,14 @@ Other News diff --git a/data/web/telegram.org/blog/monetization-for-channels.html b/data/web/telegram.org/blog/monetization-for-channels.html index 58835a51f1..bdfdf5d446 100644 --- a/data/web/telegram.org/blog/monetization-for-channels.html +++ b/data/web/telegram.org/blog/monetization-for-channels.html @@ -49,7 +49,10 @@ @@ -133,7 +133,14 @@ Other News diff --git a/data/web/telegram.org/blog/move-history.html b/data/web/telegram.org/blog/move-history.html index cab4aef846..aa84fd699d 100644 --- a/data/web/telegram.org/blog/move-history.html +++ b/data/web/telegram.org/blog/move-history.html @@ -49,7 +49,10 @@ @@ -177,7 +177,14 @@ Other News diff --git a/data/web/telegram.org/blog/my-profile-and-15-more.html b/data/web/telegram.org/blog/my-profile-and-15-more.html index ed2e3d22f7..025726a46a 100644 --- a/data/web/telegram.org/blog/my-profile-and-15-more.html +++ b/data/web/telegram.org/blog/my-profile-and-15-more.html @@ -49,7 +49,10 @@ @@ -291,7 +291,14 @@ Other News diff --git a/data/web/telegram.org/blog/new-profiles-people-nearby.html b/data/web/telegram.org/blog/new-profiles-people-nearby.html index 8094462ed4..28dea839bf 100644 --- a/data/web/telegram.org/blog/new-profiles-people-nearby.html +++ b/data/web/telegram.org/blog/new-profiles-people-nearby.html @@ -49,7 +49,10 @@ @@ -158,7 +158,14 @@ Spread the love and stay tuned for the next update! Other News diff --git a/data/web/telegram.org/blog/new-saved-messages-and-9-more.html b/data/web/telegram.org/blog/new-saved-messages-and-9-more.html index fab1ee402c..07a17fe542 100644 --- a/data/web/telegram.org/blog/new-saved-messages-and-9-more.html +++ b/data/web/telegram.org/blog/new-saved-messages-and-9-more.html @@ -49,7 +49,10 @@ @@ -241,7 +241,14 @@ Other News diff --git a/data/web/telegram.org/blog/notifications-bots.html b/data/web/telegram.org/blog/notifications-bots.html index 36abcec010..d6ecf040be 100644 --- a/data/web/telegram.org/blog/notifications-bots.html +++ b/data/web/telegram.org/blog/notifications-bots.html @@ -49,7 +49,10 @@ @@ -242,7 +242,14 @@ Other News diff --git a/data/web/telegram.org/blog/now-you-see-me.html b/data/web/telegram.org/blog/now-you-see-me.html index d00612b1eb..2b1d458706 100644 --- a/data/web/telegram.org/blog/now-you-see-me.html +++ b/data/web/telegram.org/blog/now-you-see-me.html @@ -49,7 +49,10 @@ @@ -130,7 +130,14 @@ Other News diff --git a/data/web/telegram.org/blog/passport.html b/data/web/telegram.org/blog/passport.html index 588972bd4a..2b0b6f7705 100644 --- a/data/web/telegram.org/blog/passport.html +++ b/data/web/telegram.org/blog/passport.html @@ -49,7 +49,10 @@ @@ -128,7 +128,14 @@ Other News diff --git a/data/web/telegram.org/blog/payments-2-0-scheduled-voice-chats.html b/data/web/telegram.org/blog/payments-2-0-scheduled-voice-chats.html index 870b84ef18..f17d041bb3 100644 --- a/data/web/telegram.org/blog/payments-2-0-scheduled-voice-chats.html +++ b/data/web/telegram.org/blog/payments-2-0-scheduled-voice-chats.html @@ -49,7 +49,10 @@ @@ -215,7 +215,14 @@ you can also download our Android app directly from [telegram.org](https://teleg Other News diff --git a/data/web/telegram.org/blog/payments.html b/data/web/telegram.org/blog/payments.html index f07792d23d..4260605437 100644 --- a/data/web/telegram.org/blog/payments.html +++ b/data/web/telegram.org/blog/payments.html @@ -49,7 +49,10 @@ @@ -149,7 +149,14 @@ Other News diff --git a/data/web/telegram.org/blog/permissions-groups-undo.html b/data/web/telegram.org/blog/permissions-groups-undo.html index 3634a4df94..7e3c9914ef 100644 --- a/data/web/telegram.org/blog/permissions-groups-undo.html +++ b/data/web/telegram.org/blog/permissions-groups-undo.html @@ -49,7 +49,10 @@ @@ -160,7 +160,14 @@ Other News diff --git a/data/web/telegram.org/blog/photo-editor-and-passcodes.html b/data/web/telegram.org/blog/photo-editor-and-passcodes.html index 9896006860..806fbdbf39 100644 --- a/data/web/telegram.org/blog/photo-editor-and-passcodes.html +++ b/data/web/telegram.org/blog/photo-editor-and-passcodes.html @@ -49,7 +49,10 @@ @@ -147,7 +147,14 @@ Without entering this passcode, no one will be able to access your Telegram mess Other News diff --git a/data/web/telegram.org/blog/pin-and-ifttt.html b/data/web/telegram.org/blog/pin-and-ifttt.html index 941e40af1b..e880955760 100644 --- a/data/web/telegram.org/blog/pin-and-ifttt.html +++ b/data/web/telegram.org/blog/pin-and-ifttt.html @@ -49,7 +49,10 @@ @@ -158,7 +158,14 @@ Other News diff --git a/data/web/telegram.org/blog/pinned-messages-locations-playlists.html b/data/web/telegram.org/blog/pinned-messages-locations-playlists.html index b17b060c8f..306c372da6 100644 --- a/data/web/telegram.org/blog/pinned-messages-locations-playlists.html +++ b/data/web/telegram.org/blog/pinned-messages-locations-playlists.html @@ -49,7 +49,10 @@ @@ -175,7 +175,14 @@ Other News diff --git a/data/web/telegram.org/blog/pinned-messages-locations-playlists/world.html b/data/web/telegram.org/blog/pinned-messages-locations-playlists/world.html index ff6fb39445..9d13566c99 100644 --- a/data/web/telegram.org/blog/pinned-messages-locations-playlists/world.html +++ b/data/web/telegram.org/blog/pinned-messages-locations-playlists/world.html @@ -49,7 +49,10 @@ @@ -171,7 +171,14 @@ Other News diff --git a/data/web/telegram.org/blog/polls-2-0-vmq.html b/data/web/telegram.org/blog/polls-2-0-vmq.html index 87ae351a4c..0fb5d102ee 100644 --- a/data/web/telegram.org/blog/polls-2-0-vmq.html +++ b/data/web/telegram.org/blog/polls-2-0-vmq.html @@ -49,7 +49,10 @@ @@ -166,7 +166,14 @@ Other News diff --git a/data/web/telegram.org/blog/polls.html b/data/web/telegram.org/blog/polls.html index b8cbd1b1ee..6e07857ca8 100644 --- a/data/web/telegram.org/blog/polls.html +++ b/data/web/telegram.org/blog/polls.html @@ -49,7 +49,10 @@ @@ -125,7 +125,14 @@ Other News diff --git a/data/web/telegram.org/blog/posts-in-stories-and-more.html b/data/web/telegram.org/blog/posts-in-stories-and-more.html index cdf107f39f..83a74474c3 100644 --- a/data/web/telegram.org/blog/posts-in-stories-and-more.html +++ b/data/web/telegram.org/blog/posts-in-stories-and-more.html @@ -49,7 +49,10 @@ @@ -177,7 +177,14 @@ Other News diff --git a/data/web/telegram.org/blog/power-saving.html b/data/web/telegram.org/blog/power-saving.html index a08e5d6068..8561a2f8b8 100644 --- a/data/web/telegram.org/blog/power-saving.html +++ b/data/web/telegram.org/blog/power-saving.html @@ -49,7 +49,10 @@ @@ -193,7 +193,14 @@ Other News diff --git a/data/web/telegram.org/blog/privacy-discussions-web-bots.html b/data/web/telegram.org/blog/privacy-discussions-web-bots.html index 0b386c7a33..85459e9484 100644 --- a/data/web/telegram.org/blog/privacy-discussions-web-bots.html +++ b/data/web/telegram.org/blog/privacy-discussions-web-bots.html @@ -49,7 +49,10 @@ @@ -179,7 +179,14 @@ Other News diff --git a/data/web/telegram.org/blog/privacy-revolution.html b/data/web/telegram.org/blog/privacy-revolution.html index 85e448fe20..bef30adc3c 100644 --- a/data/web/telegram.org/blog/privacy-revolution.html +++ b/data/web/telegram.org/blog/privacy-revolution.html @@ -49,7 +49,10 @@ @@ -121,7 +121,14 @@ Other News diff --git a/data/web/telegram.org/blog/profile-pics-emoji-translations.html b/data/web/telegram.org/blog/profile-pics-emoji-translations.html index 2658d50a87..86664c42b9 100644 --- a/data/web/telegram.org/blog/profile-pics-emoji-translations.html +++ b/data/web/telegram.org/blog/profile-pics-emoji-translations.html @@ -49,7 +49,10 @@ @@ -219,7 +219,14 @@ Other News diff --git a/data/web/telegram.org/blog/profile-videos-people-nearby-and-more.html b/data/web/telegram.org/blog/profile-videos-people-nearby-and-more.html index c245017390..b9be704807 100644 --- a/data/web/telegram.org/blog/profile-videos-people-nearby-and-more.html +++ b/data/web/telegram.org/blog/profile-videos-people-nearby-and-more.html @@ -49,7 +49,10 @@ @@ -208,7 +208,14 @@ Other News diff --git a/data/web/telegram.org/blog/protected-content-delete-by-date-and-more.html b/data/web/telegram.org/blog/protected-content-delete-by-date-and-more.html index d68b4f2d15..97f6446147 100644 --- a/data/web/telegram.org/blog/protected-content-delete-by-date-and-more.html +++ b/data/web/telegram.org/blog/protected-content-delete-by-date-and-more.html @@ -49,7 +49,10 @@ @@ -217,7 +217,14 @@ Other News diff --git a/data/web/telegram.org/blog/reactions-spoilers-translations.html b/data/web/telegram.org/blog/reactions-spoilers-translations.html index f732db8213..829dc3689e 100644 --- a/data/web/telegram.org/blog/reactions-spoilers-translations.html +++ b/data/web/telegram.org/blog/reactions-spoilers-translations.html @@ -49,7 +49,10 @@ @@ -193,7 +193,14 @@ Other News diff --git a/data/web/telegram.org/blog/replies-mentions-hashtags.html b/data/web/telegram.org/blog/replies-mentions-hashtags.html index 5ccd92cf35..2f6d546d7f 100644 --- a/data/web/telegram.org/blog/replies-mentions-hashtags.html +++ b/data/web/telegram.org/blog/replies-mentions-hashtags.html @@ -49,7 +49,10 @@ @@ -133,7 +133,14 @@ Other News diff --git a/data/web/telegram.org/blog/replies-mentions-stickers.html b/data/web/telegram.org/blog/replies-mentions-stickers.html index d2d326299d..770d39d3f0 100644 --- a/data/web/telegram.org/blog/replies-mentions-stickers.html +++ b/data/web/telegram.org/blog/replies-mentions-stickers.html @@ -49,7 +49,10 @@ @@ -152,7 +152,14 @@ Other News diff --git a/data/web/telegram.org/blog/reply-revolution.html b/data/web/telegram.org/blog/reply-revolution.html index ec6db491ef..6de1f4cb51 100644 --- a/data/web/telegram.org/blog/reply-revolution.html +++ b/data/web/telegram.org/blog/reply-revolution.html @@ -49,7 +49,10 @@ @@ -177,7 +177,14 @@ Other News diff --git a/data/web/telegram.org/blog/scheduled-reminders-themes.html b/data/web/telegram.org/blog/scheduled-reminders-themes.html index a4e76662af..c516e2650b 100644 --- a/data/web/telegram.org/blog/scheduled-reminders-themes.html +++ b/data/web/telegram.org/blog/scheduled-reminders-themes.html @@ -49,7 +49,10 @@ @@ -159,7 +159,14 @@ Other News diff --git a/data/web/telegram.org/blog/search-and-media.html b/data/web/telegram.org/blog/search-and-media.html index caba9a703d..bcfa2390e7 100644 --- a/data/web/telegram.org/blog/search-and-media.html +++ b/data/web/telegram.org/blog/search-and-media.html @@ -49,7 +49,10 @@ @@ -127,7 +127,14 @@ Other News diff --git a/data/web/telegram.org/blog/sessions-and-2-step-verification.html b/data/web/telegram.org/blog/sessions-and-2-step-verification.html index fa6c255ddc..fa5d5de89a 100644 --- a/data/web/telegram.org/blog/sessions-and-2-step-verification.html +++ b/data/web/telegram.org/blog/sessions-and-2-step-verification.html @@ -49,7 +49,10 @@ @@ -115,7 +115,14 @@ Other News diff --git a/data/web/telegram.org/blog/share-preview.html b/data/web/telegram.org/blog/share-preview.html index 868912b528..e13c67b79e 100644 --- a/data/web/telegram.org/blog/share-preview.html +++ b/data/web/telegram.org/blog/share-preview.html @@ -49,7 +49,10 @@ @@ -164,7 +164,14 @@ Other News diff --git a/data/web/telegram.org/blog/shareable-folders-custom-wallpapers.html b/data/web/telegram.org/blog/shareable-folders-custom-wallpapers.html index e8fc6c5fcc..6453f3611e 100644 --- a/data/web/telegram.org/blog/shareable-folders-custom-wallpapers.html +++ b/data/web/telegram.org/blog/shareable-folders-custom-wallpapers.html @@ -49,7 +49,10 @@ @@ -195,7 +195,14 @@ Other News diff --git a/data/web/telegram.org/blog/shared-files.html b/data/web/telegram.org/blog/shared-files.html index 4f0b97f34c..52fec5d212 100644 --- a/data/web/telegram.org/blog/shared-files.html +++ b/data/web/telegram.org/blog/shared-files.html @@ -49,7 +49,10 @@ @@ -126,7 +126,14 @@ Other News diff --git a/data/web/telegram.org/blog/shared-links.html b/data/web/telegram.org/blog/shared-links.html index 41ad976eee..f7bcbb3541 100644 --- a/data/web/telegram.org/blog/shared-links.html +++ b/data/web/telegram.org/blog/shared-links.html @@ -49,7 +49,10 @@ @@ -116,7 +116,14 @@ Other News diff --git a/data/web/telegram.org/blog/shared-media-scrolling-calendar-join-requests-and-more.html b/data/web/telegram.org/blog/shared-media-scrolling-calendar-join-requests-and-more.html index ada4c12291..7f72bcfde7 100644 --- a/data/web/telegram.org/blog/shared-media-scrolling-calendar-join-requests-and-more.html +++ b/data/web/telegram.org/blog/shared-media-scrolling-calendar-join-requests-and-more.html @@ -49,7 +49,10 @@ @@ -236,7 +236,14 @@ TEST Other News diff --git a/data/web/telegram.org/blog/silent-messages-slow-mode.html b/data/web/telegram.org/blog/silent-messages-slow-mode.html index fe8fc82f2a..799b052c9c 100644 --- a/data/web/telegram.org/blog/silent-messages-slow-mode.html +++ b/data/web/telegram.org/blog/silent-messages-slow-mode.html @@ -49,7 +49,10 @@ @@ -191,7 +191,14 @@ Other News diff --git a/data/web/telegram.org/blog/similar-channels.html b/data/web/telegram.org/blog/similar-channels.html index 09f45e52e8..c030edd263 100644 --- a/data/web/telegram.org/blog/similar-channels.html +++ b/data/web/telegram.org/blog/similar-channels.html @@ -49,7 +49,10 @@ @@ -228,7 +228,14 @@ Other News diff --git a/data/web/telegram.org/blog/star-giveaways-iv-in-browser.html b/data/web/telegram.org/blog/star-giveaways-iv-in-browser.html index 2d3a55eda2..7eca4b37f6 100644 --- a/data/web/telegram.org/blog/star-giveaways-iv-in-browser.html +++ b/data/web/telegram.org/blog/star-giveaways-iv-in-browser.html @@ -49,7 +49,10 @@ @@ -158,7 +158,14 @@ Other News diff --git a/data/web/telegram.org/blog/sticker-maker.html b/data/web/telegram.org/blog/sticker-maker.html index d388aaf039..864b2ec058 100644 --- a/data/web/telegram.org/blog/sticker-maker.html +++ b/data/web/telegram.org/blog/sticker-maker.html @@ -49,7 +49,10 @@ @@ -161,7 +161,14 @@ Other News diff --git a/data/web/telegram.org/blog/stickers-meet-art-and-history.html b/data/web/telegram.org/blog/stickers-meet-art-and-history.html index dc0840819b..9bccca9067 100644 --- a/data/web/telegram.org/blog/stickers-meet-art-and-history.html +++ b/data/web/telegram.org/blog/stickers-meet-art-and-history.html @@ -49,7 +49,10 @@ @@ -233,7 +233,14 @@ Other News diff --git a/data/web/telegram.org/blog/stickers-revolution.html b/data/web/telegram.org/blog/stickers-revolution.html index a2eb6f1277..b9ac1896ae 100644 --- a/data/web/telegram.org/blog/stickers-revolution.html +++ b/data/web/telegram.org/blog/stickers-revolution.html @@ -49,7 +49,10 @@ @@ -126,7 +126,14 @@ Other News diff --git a/data/web/telegram.org/blog/stickers.html b/data/web/telegram.org/blog/stickers.html index 5230631dc9..0ef516aae6 100644 --- a/data/web/telegram.org/blog/stickers.html +++ b/data/web/telegram.org/blog/stickers.html @@ -49,7 +49,10 @@ @@ -120,7 +120,14 @@ Other News diff --git a/data/web/telegram.org/blog/stories.html b/data/web/telegram.org/blog/stories.html index 6df4ca60b9..619d444124 100644 --- a/data/web/telegram.org/blog/stories.html +++ b/data/web/telegram.org/blog/stories.html @@ -49,7 +49,10 @@ @@ -204,7 +204,14 @@ Other News diff --git a/data/web/telegram.org/blog/superchannels-star-reactions-subscriptions.html b/data/web/telegram.org/blog/superchannels-star-reactions-subscriptions.html index 27167ce474..d532b91095 100644 --- a/data/web/telegram.org/blog/superchannels-star-reactions-subscriptions.html +++ b/data/web/telegram.org/blog/superchannels-star-reactions-subscriptions.html @@ -49,7 +49,10 @@ @@ -186,7 +186,14 @@ This update is already available for all iOS users and for everyone who download Other News diff --git a/data/web/telegram.org/blog/supergroups.html b/data/web/telegram.org/blog/supergroups.html index 1852d9ad39..4a5fea4a0c 100644 --- a/data/web/telegram.org/blog/supergroups.html +++ b/data/web/telegram.org/blog/supergroups.html @@ -49,7 +49,10 @@ @@ -146,7 +146,14 @@ Other News diff --git a/data/web/telegram.org/blog/supergroups5k.html b/data/web/telegram.org/blog/supergroups5k.html index 8d4b81588b..23aa49ca54 100644 --- a/data/web/telegram.org/blog/supergroups5k.html +++ b/data/web/telegram.org/blog/supergroups5k.html @@ -49,7 +49,10 @@ @@ -127,7 +127,14 @@ Other News diff --git a/data/web/telegram.org/blog/tdlib.html b/data/web/telegram.org/blog/tdlib.html index 1161e1dc12..eee7ea244d 100644 --- a/data/web/telegram.org/blog/tdlib.html +++ b/data/web/telegram.org/blog/tdlib.html @@ -49,7 +49,10 @@ @@ -123,7 +123,14 @@ Other News diff --git a/data/web/telegram.org/blog/telegram-5-ios.html b/data/web/telegram.org/blog/telegram-5-ios.html index 18a53cc772..ad36669492 100644 --- a/data/web/telegram.org/blog/telegram-5-ios.html +++ b/data/web/telegram.org/blog/telegram-5-ios.html @@ -49,7 +49,10 @@ @@ -163,7 +163,14 @@ Other News diff --git a/data/web/telegram.org/blog/telegram-business.html b/data/web/telegram.org/blog/telegram-business.html index c9e0c6e010..c2b1fb5ab9 100644 --- a/data/web/telegram.org/blog/telegram-business.html +++ b/data/web/telegram.org/blog/telegram-business.html @@ -49,7 +49,10 @@ @@ -219,7 +219,14 @@ Other News diff --git a/data/web/telegram.org/blog/telegram-me-change-number-and-pfs.html b/data/web/telegram.org/blog/telegram-me-change-number-and-pfs.html index 0f2222d519..f36066acea 100644 --- a/data/web/telegram.org/blog/telegram-me-change-number-and-pfs.html +++ b/data/web/telegram.org/blog/telegram-me-change-number-and-pfs.html @@ -49,7 +49,10 @@ @@ -123,7 +123,14 @@ Other News diff --git a/data/web/telegram.org/blog/telegram-stars.html b/data/web/telegram.org/blog/telegram-stars.html index 2203bfde6e..136f729879 100644 --- a/data/web/telegram.org/blog/telegram-stars.html +++ b/data/web/telegram.org/blog/telegram-stars.html @@ -49,7 +49,10 @@ @@ -132,7 +132,14 @@ Other News diff --git a/data/web/telegram.org/blog/telegram-x.html b/data/web/telegram.org/blog/telegram-x.html index 76bcb07029..22db49113b 100644 --- a/data/web/telegram.org/blog/telegram-x.html +++ b/data/web/telegram.org/blog/telegram-x.html @@ -49,7 +49,10 @@ @@ -157,7 +157,14 @@ Other News diff --git a/data/web/telegram.org/blog/telegraph.html b/data/web/telegram.org/blog/telegraph.html index e3dcabb96f..6d19165768 100644 --- a/data/web/telegram.org/blog/telegraph.html +++ b/data/web/telegram.org/blog/telegraph.html @@ -49,7 +49,10 @@ @@ -133,7 +133,14 @@ Other News diff --git a/data/web/telegram.org/blog/themes-accounts.html b/data/web/telegram.org/blog/themes-accounts.html index 09d3047c28..15bc13dcc5 100644 --- a/data/web/telegram.org/blog/themes-accounts.html +++ b/data/web/telegram.org/blog/themes-accounts.html @@ -49,7 +49,10 @@ @@ -142,7 +142,14 @@ Other News diff --git a/data/web/telegram.org/blog/topics-in-groups-collectible-usernames.html b/data/web/telegram.org/blog/topics-in-groups-collectible-usernames.html index 3c221dc98b..7dc5440fd0 100644 --- a/data/web/telegram.org/blog/topics-in-groups-collectible-usernames.html +++ b/data/web/telegram.org/blog/topics-in-groups-collectible-usernames.html @@ -49,7 +49,10 @@ @@ -192,7 +192,14 @@ Other News diff --git a/data/web/telegram.org/blog/translations-iv2.html b/data/web/telegram.org/blog/translations-iv2.html index 9baf437b10..9897780032 100644 --- a/data/web/telegram.org/blog/translations-iv2.html +++ b/data/web/telegram.org/blog/translations-iv2.html @@ -49,7 +49,10 @@ @@ -171,7 +171,14 @@ Other News diff --git a/data/web/telegram.org/blog/trending-stickers.html b/data/web/telegram.org/blog/trending-stickers.html index 49a321c591..20a727f1a2 100644 --- a/data/web/telegram.org/blog/trending-stickers.html +++ b/data/web/telegram.org/blog/trending-stickers.html @@ -49,7 +49,10 @@ @@ -157,7 +157,14 @@ Other News diff --git a/data/web/telegram.org/blog/ultimate-privacy-topics-2-0.html b/data/web/telegram.org/blog/ultimate-privacy-topics-2-0.html index 60def24795..e856316f54 100644 --- a/data/web/telegram.org/blog/ultimate-privacy-topics-2-0.html +++ b/data/web/telegram.org/blog/ultimate-privacy-topics-2-0.html @@ -49,7 +49,10 @@ @@ -226,7 +226,14 @@ Other News diff --git a/data/web/telegram.org/blog/unread-replace-2x.html b/data/web/telegram.org/blog/unread-replace-2x.html index faab289f35..cd773ce07e 100644 --- a/data/web/telegram.org/blog/unread-replace-2x.html +++ b/data/web/telegram.org/blog/unread-replace-2x.html @@ -49,7 +49,10 @@ @@ -154,7 +154,14 @@ Other News diff --git a/data/web/telegram.org/blog/unsend-and-usage.html b/data/web/telegram.org/blog/unsend-and-usage.html index f4c5122521..b9d087c313 100644 --- a/data/web/telegram.org/blog/unsend-and-usage.html +++ b/data/web/telegram.org/blog/unsend-and-usage.html @@ -49,7 +49,10 @@ @@ -168,7 +168,14 @@ Other News diff --git a/data/web/telegram.org/blog/unsend-privacy-emoji.html b/data/web/telegram.org/blog/unsend-privacy-emoji.html index 34ad679208..9b580d0bb6 100644 --- a/data/web/telegram.org/blog/unsend-privacy-emoji.html +++ b/data/web/telegram.org/blog/unsend-privacy-emoji.html @@ -49,7 +49,10 @@ @@ -156,7 +156,14 @@ Other News diff --git a/data/web/telegram.org/blog/usernames-and-secret-chats-v2.html b/data/web/telegram.org/blog/usernames-and-secret-chats-v2.html index 77d8fac38b..70366635d2 100644 --- a/data/web/telegram.org/blog/usernames-and-secret-chats-v2.html +++ b/data/web/telegram.org/blog/usernames-and-secret-chats-v2.html @@ -49,7 +49,10 @@ @@ -117,7 +117,14 @@ Other News diff --git a/data/web/telegram.org/blog/verifiable-apps-and-more.html b/data/web/telegram.org/blog/verifiable-apps-and-more.html index b752819072..8278b8744f 100644 --- a/data/web/telegram.org/blog/verifiable-apps-and-more.html +++ b/data/web/telegram.org/blog/verifiable-apps-and-more.html @@ -49,7 +49,10 @@ @@ -287,7 +287,14 @@ Other News diff --git a/data/web/telegram.org/blog/video-1000.html b/data/web/telegram.org/blog/video-1000.html index a91a5582ba..e471182fe7 100644 --- a/data/web/telegram.org/blog/video-1000.html +++ b/data/web/telegram.org/blog/video-1000.html @@ -49,7 +49,10 @@ @@ -247,7 +247,14 @@ Other News diff --git a/data/web/telegram.org/blog/video-calls.html b/data/web/telegram.org/blog/video-calls.html index 92fe01a3be..d78bd673c6 100644 --- a/data/web/telegram.org/blog/video-calls.html +++ b/data/web/telegram.org/blog/video-calls.html @@ -49,7 +49,10 @@ @@ -127,7 +127,14 @@ Other News diff --git a/data/web/telegram.org/blog/video-editor-gifs.html b/data/web/telegram.org/blog/video-editor-gifs.html index 1b03d385f0..ce5cc2131f 100644 --- a/data/web/telegram.org/blog/video-editor-gifs.html +++ b/data/web/telegram.org/blog/video-editor-gifs.html @@ -49,7 +49,10 @@ @@ -147,7 +147,14 @@ Other News diff --git a/data/web/telegram.org/blog/video-messages-and-telescope.html b/data/web/telegram.org/blog/video-messages-and-telescope.html index 0458250c07..d6a3c18b2b 100644 --- a/data/web/telegram.org/blog/video-messages-and-telescope.html +++ b/data/web/telegram.org/blog/video-messages-and-telescope.html @@ -49,7 +49,10 @@ @@ -142,7 +142,14 @@ Other News diff --git a/data/web/telegram.org/blog/video-stickers-better-reactions.html b/data/web/telegram.org/blog/video-stickers-better-reactions.html index 2159e7484f..86953a36a9 100644 --- a/data/web/telegram.org/blog/video-stickers-better-reactions.html +++ b/data/web/telegram.org/blog/video-stickers-better-reactions.html @@ -49,7 +49,10 @@ @@ -166,7 +166,14 @@ Other News diff --git a/data/web/telegram.org/blog/voice-2-secret-3.html b/data/web/telegram.org/blog/voice-2-secret-3.html index d870fa8582..b22c15620f 100644 --- a/data/web/telegram.org/blog/voice-2-secret-3.html +++ b/data/web/telegram.org/blog/voice-2-secret-3.html @@ -49,7 +49,10 @@ @@ -140,7 +140,14 @@ Other News diff --git a/data/web/telegram.org/blog/voice-chats-on-steroids.html b/data/web/telegram.org/blog/voice-chats-on-steroids.html index f6a9121203..b651d49ddc 100644 --- a/data/web/telegram.org/blog/voice-chats-on-steroids.html +++ b/data/web/telegram.org/blog/voice-chats-on-steroids.html @@ -49,7 +49,10 @@ @@ -168,7 +168,14 @@ Other News diff --git a/data/web/telegram.org/blog/voice-chats.html b/data/web/telegram.org/blog/voice-chats.html index 3bf3e452ae..2df4cdafb8 100644 --- a/data/web/telegram.org/blog/voice-chats.html +++ b/data/web/telegram.org/blog/voice-chats.html @@ -49,7 +49,10 @@ @@ -204,7 +204,14 @@ Other News diff --git a/data/web/telegram.org/blog/w3-browser-mini-app-store.html b/data/web/telegram.org/blog/w3-browser-mini-app-store.html index 5e026964d5..091aa5fe6f 100644 --- a/data/web/telegram.org/blog/w3-browser-mini-app-store.html +++ b/data/web/telegram.org/blog/w3-browser-mini-app-store.html @@ -49,7 +49,10 @@ @@ -209,7 +209,14 @@ Other News diff --git a/data/web/telegram.org/blog/winter-contest-ends.html b/data/web/telegram.org/blog/winter-contest-ends.html index 3a96348150..f8ecc9ce7a 100644 --- a/data/web/telegram.org/blog/winter-contest-ends.html +++ b/data/web/telegram.org/blog/winter-contest-ends.html @@ -49,7 +49,10 @@ @@ -122,7 +122,14 @@ DC 5: Other News diff --git a/data/web/telegram.org/js/telegram-web-app.js b/data/web/telegram.org/js/telegram-web-app.js index 24f992eb99..7c688f04a3 100644 --- a/data/web/telegram.org/js/telegram-web-app.js +++ b/data/web/telegram.org/js/telegram-web-app.js @@ -288,6 +288,9 @@ var themeParams = {}, colorScheme = 'light'; var webAppVersion = '6.0'; var webAppPlatform = 'unknown'; + var webAppIsActive = true; + var webAppIsFullscreen = false; + var webAppIsOrientationLocked = false; if (initParams.tgWebAppData && initParams.tgWebAppData.length) { webAppInitData = initParams.tgWebAppData; @@ -302,6 +305,7 @@ } catch (e) {} } } + var stored_theme_params = Utils.sessionStorageGet('themeParams'); if (initParams.tgWebAppThemeParams && initParams.tgWebAppThemeParams.length) { var themeParamsRaw = initParams.tgWebAppThemeParams; try { @@ -311,9 +315,8 @@ } } catch (e) {} } - var theme_params = Utils.sessionStorageGet('themeParams'); - if (theme_params) { - setThemeParams(theme_params); + if (stored_theme_params) { + setThemeParams(stored_theme_params); } if (initParams.tgWebAppVersion) { webAppVersion = initParams.tgWebAppVersion; @@ -322,6 +325,19 @@ webAppPlatform = initParams.tgWebAppPlatform; } + var stored_fullscreen = Utils.sessionStorageGet('isFullscreen'); + if (initParams.tgWebAppFullscreen) { + setFullscreen(true); + } + if (stored_fullscreen) { + setFullscreen(stored_fullscreen == 'yes'); + } + + var stored_orientation_lock = Utils.sessionStorageGet('isOrientationLocked'); + if (stored_orientation_lock) { + setOrientationLock(stored_orientation_lock == 'yes'); + } + function onThemeChanged(eventType, eventData) { if (eventData.theme_params) { setThemeParams(eventData.theme_params); @@ -351,6 +367,27 @@ } } + function onSafeAreaChanged(eventType, eventData) { + if (eventData) { + setSafeAreaInset(eventData); + } + } + function onContentSafeAreaChanged(eventType, eventData) { + if (eventData) { + setContentSafeAreaInset(eventData); + } + } + + function onVisibilityChanged(eventType, eventData) { + if (eventData.is_visible) { + webAppIsActive = true; + receiveWebViewEvent('activated'); + } else { + webAppIsActive = false; + receiveWebViewEvent('deactivated'); + } + } + function linkHandler(e) { if (e.metaKey || e.ctrlKey) return; var el = e.target; @@ -393,6 +430,16 @@ } } + function setFullscreen(is_fullscreen) { + webAppIsFullscreen = !!is_fullscreen; + Utils.sessionStorageSet('isFullscreen', webAppIsFullscreen ? 'yes' : 'no'); + } + + function setOrientationLock(is_locked) { + webAppIsOrientationLocked = !!is_locked; + Utils.sessionStorageSet('isOrientationLocked', webAppIsOrientationLocked ? 'yes' : 'no'); + } + function setThemeParams(theme_params) { // temp iOS fix if (theme_params.bg_color == '#1c1c1d' && @@ -457,6 +504,52 @@ setCssProperty('viewport-stable-height', stable_height); } + var safeAreaInset = {top: 0, bottom: 0, left: 0, right: 0}; + function setSafeAreaInset(data) { + if (typeof data !== 'undefined') { + if (typeof data.top !== 'undefined') { + safeAreaInset.top = data.top; + } + if (typeof data.bottom !== 'undefined') { + safeAreaInset.bottom = data.bottom; + } + if (typeof data.left !== 'undefined') { + safeAreaInset.left = data.left; + } + if (typeof data.right !== 'undefined') { + safeAreaInset.right = data.right; + } + receiveWebViewEvent('safeAreaChanged'); + } + setCssProperty('safe-area-inset-top', safeAreaInset.top + 'px'); + setCssProperty('safe-area-inset-bottom', safeAreaInset.bottom + 'px'); + setCssProperty('safe-area-inset-left', safeAreaInset.left + 'px'); + setCssProperty('safe-area-inset-right', safeAreaInset.right + 'px'); + } + + var contentSafeAreaInset = {top: 0, bottom: 0, left: 0, right: 0}; + function setContentSafeAreaInset(data) { + if (typeof data !== 'undefined') { + if (typeof data.top !== 'undefined') { + contentSafeAreaInset.top = data.top; + } + if (typeof data.bottom !== 'undefined') { + contentSafeAreaInset.bottom = data.bottom; + } + if (typeof data.left !== 'undefined') { + contentSafeAreaInset.left = data.left; + } + if (typeof data.right !== 'undefined') { + contentSafeAreaInset.right = data.right; + } + receiveWebViewEvent('contentSafeAreaChanged'); + } + setCssProperty('content-safe-area-inset-top', contentSafeAreaInset.top + 'px'); + setCssProperty('content-safe-area-inset-bottom', contentSafeAreaInset.bottom + 'px'); + setCssProperty('content-safe-area-inset-left', contentSafeAreaInset.left + 'px'); + setCssProperty('content-safe-area-inset-right', contentSafeAreaInset.right + 'px'); + } + var isClosingConfirmationEnabled = false; function setClosingConfirmation(need_confirmation) { if (!versionAtLeast('6.2')) { @@ -477,6 +570,126 @@ WebView.postEvent('web_app_setup_swipe_behavior', false, {allow_vertical_swipe: isVerticalSwipesEnabled}); } + function onFullscreenChanged(eventType, eventData) { + setFullscreen(eventData.is_fullscreen); + receiveWebViewEvent('fullscreenChanged'); + } + function onFullscreenFailed(eventType, eventData) { + if (eventData.error == 'ALREADY_FULLSCREEN' && !webAppIsFullscreen) { + setFullscreen(true); + } + receiveWebViewEvent('fullscreenFailed', { + error: eventData.error + }); + } + + function toggleOrientationLock(locked) { + if (!versionAtLeast('8.0')) { + console.warn('[Telegram.WebApp] Orientation locking is not supported in version ' + webAppVersion); + return; + } + setOrientationLock(locked); + WebView.postEvent('web_app_toggle_orientation_lock', false, {locked: webAppIsOrientationLocked}); + } + + var homeScreenCallbacks = []; + function onHomeScreenAdded(eventType, eventData) { + receiveWebViewEvent('homeScreenAdded'); + } + function onHomeScreenChecked(eventType, eventData) { + var status = eventData.status || 'unknown'; + if (homeScreenCallbacks.length > 0) { + for (var i = 0; i < homeScreenCallbacks.length; i++) { + var callback = homeScreenCallbacks[i]; + callback(status); + } + homeScreenCallbacks = []; + } + receiveWebViewEvent('homeScreenChecked', { + status: status + }); + } + + var WebAppShareMessageOpened = false; + function onPreparedMessageSent(eventType, eventData) { + if (WebAppShareMessageOpened) { + var requestData = WebAppShareMessageOpened; + WebAppShareMessageOpened = false; + if (requestData.callback) { + requestData.callback(true); + } + receiveWebViewEvent('shareMessageSent'); + } + } + function onPreparedMessageFailed(eventType, eventData) { + if (WebAppShareMessageOpened) { + var requestData = WebAppShareMessageOpened; + WebAppShareMessageOpened = false; + if (requestData.callback) { + requestData.callback(false); + } + receiveWebViewEvent('shareMessageFailed', { + error: eventData.error + }); + } + } + + var WebAppEmojiStatusRequested = false; + function onEmojiStatusSet(eventType, eventData) { + if (WebAppEmojiStatusRequested) { + var requestData = WebAppEmojiStatusRequested; + WebAppEmojiStatusRequested = false; + if (requestData.callback) { + requestData.callback(true); + } + receiveWebViewEvent('emojiStatusSet'); + } + } + function onEmojiStatusFailed(eventType, eventData) { + if (WebAppEmojiStatusRequested) { + var requestData = WebAppEmojiStatusRequested; + WebAppEmojiStatusRequested = false; + if (requestData.callback) { + requestData.callback(false); + } + receiveWebViewEvent('emojiStatusFailed', { + error: eventData.error + }); + } + } + var WebAppEmojiStatusAccessRequested = false; + function onEmojiStatusAccessRequested(eventType, eventData) { + if (WebAppEmojiStatusAccessRequested) { + var requestData = WebAppEmojiStatusAccessRequested; + WebAppEmojiStatusAccessRequested = false; + if (requestData.callback) { + requestData.callback(eventData.status == 'allowed'); + } + receiveWebViewEvent('emojiStatusAccessRequested', { + status: eventData.status + }); + } + } + + var webAppPopupOpened = false; + function onPopupClosed(eventType, eventData) { + if (webAppPopupOpened) { + var popupData = webAppPopupOpened; + webAppPopupOpened = false; + var button_id = null; + if (typeof eventData.button_id !== 'undefined') { + button_id = eventData.button_id; + } + if (popupData.callback) { + popupData.callback(button_id); + } + receiveWebViewEvent('popupClosed', { + button_id: button_id + }); + } + } + + var headerColorKey = 'bg_color', headerColor = null; function getHeaderColor() { if (headerColorKey == 'secondary_bg_color') { @@ -1333,6 +1546,7 @@ var callback = initRequestState.callbacks[i]; callback(); } + initRequestState.callbacks = []; } if (accessRequestState) { var state = accessRequestState; @@ -1531,6 +1745,525 @@ return biometricManager; })(); + var LocationManager = (function() { + var isInited = false; + var isLocationAvailable = false; + var isAccessRequested = false; + var isAccessGranted = false; + + var locationManager = {}; + Object.defineProperty(locationManager, 'isInited', { + get: function(){ return isInited; }, + enumerable: true + }); + Object.defineProperty(locationManager, 'isLocationAvailable', { + get: function(){ return isInited && isLocationAvailable; }, + enumerable: true + }); + Object.defineProperty(locationManager, 'isAccessRequested', { + get: function(){ return isAccessRequested; }, + enumerable: true + }); + Object.defineProperty(locationManager, 'isAccessGranted', { + get: function(){ return isAccessRequested && isAccessGranted; }, + enumerable: true + }); + + var initRequestState = {callbacks: []}; + var getRequestState = {callbacks: []}; + + WebView.onEvent('location_checked', onLocationChecked); + WebView.onEvent('location_requested', onLocationRequested); + + function onLocationChecked(eventType, eventData) { + isInited = true; + if (eventData.available) { + isLocationAvailable = true; + if (eventData.access_requested) { + isAccessRequested = true; + isAccessGranted = !!eventData.access_granted; + } else { + isAccessRequested = false; + isAccessGranted = false; + } + } else { + isLocationAvailable = false; + isAccessRequested = false; + isAccessGranted = false; + } + + if (initRequestState.callbacks.length > 0) { + for (var i = 0; i < initRequestState.callbacks.length; i++) { + var callback = initRequestState.callbacks[i]; + callback(); + } + initRequestState.callbacks = []; + } + receiveWebViewEvent('locationManagerUpdated'); + } + function onLocationRequested(eventType, eventData) { + if (!eventData.available) { + locationData = null; + } else { + var locationData = { + latitude: eventData.latitude, + longitude: eventData.longitude, + altitude: null, + course: null, + speed: null, + horizontal_accuracy: null, + vertical_accuracy: null, + course_accuracy: null, + speed_accuracy: null, + }; + if (typeof eventData.altitude !== 'undefined' && eventData.altitude !== null) { + locationData.altitude = eventData.altitude; + } + if (typeof eventData.course !== 'undefined' && eventData.course !== null) { + locationData.course = eventData.course % 360; + } + if (typeof eventData.speed !== 'undefined' && eventData.speed !== null) { + locationData.speed = eventData.speed; + } + if (typeof eventData.horizontal_accuracy !== 'undefined' && eventData.horizontal_accuracy !== null) { + locationData.horizontal_accuracy = eventData.horizontal_accuracy; + } + if (typeof eventData.vertical_accuracy !== 'undefined' && eventData.vertical_accuracy !== null) { + locationData.vertical_accuracy = eventData.vertical_accuracy; + } + if (typeof eventData.course_accuracy !== 'undefined' && eventData.course_accuracy !== null) { + locationData.course_accuracy = eventData.course_accuracy; + } + if (typeof eventData.speed_accuracy !== 'undefined' && eventData.speed_accuracy !== null) { + locationData.speed_accuracy = eventData.speed_accuracy; + } + } + if (!eventData.available || + !isLocationAvailable || + !isAccessRequested || + !isAccessGranted) { + initRequestState.callbacks.push(function() { + locationResponse(locationData); + }); + WebView.postEvent('web_app_check_location', false); + } else { + locationResponse(locationData); + } + } + function locationResponse(response) { + if (getRequestState.callbacks.length > 0) { + for (var i = 0; i < getRequestState.callbacks.length; i++) { + var callback = getRequestState.callbacks[i]; + callback(response); + } + getRequestState.callbacks = []; + } + if (response !== null) { + receiveWebViewEvent('locationRequested', { + locationData: response + }); + } + } + + function checkVersion() { + if (!versionAtLeast('8.0')) { + console.warn('[Telegram.WebApp] LocationManager is not supported in version ' + webAppVersion); + return false; + } + return true; + } + + function checkInit() { + if (!isInited) { + console.error('[Telegram.WebApp] LocationManager should be inited before using.'); + throw Error('WebAppLocationManagerNotInited'); + } + return true; + } + + locationManager.init = function(callback) { + if (!checkVersion()) { + return locationManager; + } + if (isInited) { + return locationManager; + } + if (callback) { + initRequestState.callbacks.push(callback); + } + WebView.postEvent('web_app_check_location', false); + return locationManager; + }; + locationManager.getLocation = function(callback) { + if (!checkVersion()) { + return locationManager; + } + checkInit(); + if (!isLocationAvailable) { + console.error('[Telegram.WebApp] Location is not available on this device.'); + throw Error('WebAppLocationManagerLocationNotAvailable'); + } + + getRequestState.callbacks.push(callback); + WebView.postEvent('web_app_request_location'); + return locationManager; + }; + locationManager.openSettings = function() { + if (!checkVersion()) { + return locationManager; + } + checkInit(); + if (!isLocationAvailable) { + console.error('[Telegram.WebApp] Location is not available on this device.'); + throw Error('WebAppLocationManagerLocationNotAvailable'); + } + if (!isAccessRequested) { + console.error('[Telegram.WebApp] Location access was not requested yet.'); + throw Error('WebAppLocationManagerLocationAccessNotRequested'); + } + if (isAccessGranted) { + console.warn('[Telegram.WebApp] Location access was granted by the user, no need to go to settings.'); + return locationManager; + } + WebView.postEvent('web_app_open_location_settings', false); + return locationManager; + }; + return locationManager; + })(); + + var Accelerometer = (function() { + var isStarted = false; + var valueX = null, valueY = null, valueZ = null; + var startCallbacks = [], stopCallbacks = []; + + var accelerometer = {}; + Object.defineProperty(accelerometer, 'isStarted', { + get: function(){ return isStarted; }, + enumerable: true + }); + Object.defineProperty(accelerometer, 'x', { + get: function(){ return valueX; }, + enumerable: true + }); + Object.defineProperty(accelerometer, 'y', { + get: function(){ return valueY; }, + enumerable: true + }); + Object.defineProperty(accelerometer, 'z', { + get: function(){ return valueZ; }, + enumerable: true + }); + + WebView.onEvent('accelerometer_started', onAccelerometerStarted); + WebView.onEvent('accelerometer_stopped', onAccelerometerStopped); + WebView.onEvent('accelerometer_changed', onAccelerometerChanged); + WebView.onEvent('accelerometer_failed', onAccelerometerFailed); + + function onAccelerometerStarted(eventType, eventData) { + isStarted = true; + if (startCallbacks.length > 0) { + for (var i = 0; i < startCallbacks.length; i++) { + var callback = startCallbacks[i]; + callback(true); + } + startCallbacks = []; + } + receiveWebViewEvent('accelerometerStarted'); + } + function onAccelerometerStopped(eventType, eventData) { + isStarted = false; + if (stopCallbacks.length > 0) { + for (var i = 0; i < stopCallbacks.length; i++) { + var callback = stopCallbacks[i]; + callback(true); + } + stopCallbacks = []; + } + receiveWebViewEvent('accelerometerStopped'); + } + function onAccelerometerChanged(eventType, eventData) { + valueX = eventData.x; + valueY = eventData.y; + valueZ = eventData.z; + receiveWebViewEvent('accelerometerChanged'); + } + function onAccelerometerFailed(eventType, eventData) { + if (startCallbacks.length > 0) { + for (var i = 0; i < startCallbacks.length; i++) { + var callback = startCallbacks[i]; + callback(false); + } + startCallbacks = []; + } + receiveWebViewEvent('accelerometerFailed', { + error: eventData.error + }); + } + + function checkVersion() { + if (!versionAtLeast('8.0')) { + console.warn('[Telegram.WebApp] Accelerometer is not supported in version ' + webAppVersion); + return false; + } + return true; + } + + accelerometer.start = function(params, callback) { + params = params || {}; + if (!checkVersion()) { + return accelerometer; + } + var req_params = {}; + var refresh_rate = parseInt(params.refresh_rate || 1000); + if (isNaN(refresh_rate) || refresh_rate < 20 || refresh_rate > 1000) { + console.warn('[Telegram.WebApp] Accelerometer refresh_rate is invalid', refresh_rate); + } else { + req_params.refresh_rate = refresh_rate; + } + + if (callback) { + startCallbacks.push(callback); + } + WebView.postEvent('web_app_start_accelerometer', false, req_params); + return accelerometer; + }; + accelerometer.stop = function(callback) { + if (!checkVersion()) { + return accelerometer; + } + if (callback) { + stopCallbacks.push(callback); + } + WebView.postEvent('web_app_stop_accelerometer'); + return accelerometer; + }; + return accelerometer; + })(); + + var DeviceOrientation = (function() { + var isStarted = false; + var valueAlpha = null, valueBeta = null, valueGamma = null, valueAbsolute = false; + var startCallbacks = [], stopCallbacks = []; + + var deviceOrientation = {}; + Object.defineProperty(deviceOrientation, 'isStarted', { + get: function(){ return isStarted; }, + enumerable: true + }); + Object.defineProperty(deviceOrientation, 'absolute', { + get: function(){ return valueAbsolute; }, + enumerable: true + }); + Object.defineProperty(deviceOrientation, 'alpha', { + get: function(){ return valueAlpha; }, + enumerable: true + }); + Object.defineProperty(deviceOrientation, 'beta', { + get: function(){ return valueBeta; }, + enumerable: true + }); + Object.defineProperty(deviceOrientation, 'gamma', { + get: function(){ return valueGamma; }, + enumerable: true + }); + + WebView.onEvent('device_orientation_started', onDeviceOrientationStarted); + WebView.onEvent('device_orientation_stopped', onDeviceOrientationStopped); + WebView.onEvent('device_orientation_changed', onDeviceOrientationChanged); + WebView.onEvent('device_orientation_failed', onDeviceOrientationFailed); + + function onDeviceOrientationStarted(eventType, eventData) { + isStarted = true; + if (startCallbacks.length > 0) { + for (var i = 0; i < startCallbacks.length; i++) { + var callback = startCallbacks[i]; + callback(true); + } + startCallbacks = []; + } + receiveWebViewEvent('deviceOrientationStarted'); + } + function onDeviceOrientationStopped(eventType, eventData) { + isStarted = false; + if (stopCallbacks.length > 0) { + for (var i = 0; i < stopCallbacks.length; i++) { + var callback = stopCallbacks[i]; + callback(true); + } + stopCallbacks = []; + } + receiveWebViewEvent('deviceOrientationStopped'); + } + function onDeviceOrientationChanged(eventType, eventData) { + valueAbsolute = !!eventData.absolute; + valueAlpha = eventData.alpha; + valueBeta = eventData.beta; + valueGamma = eventData.gamma; + receiveWebViewEvent('deviceOrientationChanged'); + } + function onDeviceOrientationFailed(eventType, eventData) { + if (startCallbacks.length > 0) { + for (var i = 0; i < startCallbacks.length; i++) { + var callback = startCallbacks[i]; + callback(false); + } + startCallbacks = []; + } + receiveWebViewEvent('deviceOrientationFailed', { + error: eventData.error + }); + } + + function checkVersion() { + if (!versionAtLeast('8.0')) { + console.warn('[Telegram.WebApp] DeviceOrientation is not supported in version ' + webAppVersion); + return false; + } + return true; + } + + deviceOrientation.start = function(params, callback) { + params = params || {}; + if (!checkVersion()) { + return deviceOrientation; + } + var req_params = {}; + var refresh_rate = parseInt(params.refresh_rate || 1000); + if (isNaN(refresh_rate) || refresh_rate < 20 || refresh_rate > 1000) { + console.warn('[Telegram.WebApp] DeviceOrientation refresh_rate is invalid', refresh_rate); + } else { + req_params.refresh_rate = refresh_rate; + } + req_params.need_absolute = !!params.need_absolute; + + if (callback) { + startCallbacks.push(callback); + } + WebView.postEvent('web_app_start_device_orientation', false, req_params); + return deviceOrientation; + }; + deviceOrientation.stop = function(callback) { + if (!checkVersion()) { + return deviceOrientation; + } + if (callback) { + stopCallbacks.push(callback); + } + WebView.postEvent('web_app_stop_device_orientation'); + return deviceOrientation; + }; + return deviceOrientation; + })(); + + var Gyroscope = (function() { + var isStarted = false; + var valueX = null, valueY = null, valueZ = null; + var startCallbacks = [], stopCallbacks = []; + + var gyroscope = {}; + Object.defineProperty(gyroscope, 'isStarted', { + get: function(){ return isStarted; }, + enumerable: true + }); + Object.defineProperty(gyroscope, 'x', { + get: function(){ return valueX; }, + enumerable: true + }); + Object.defineProperty(gyroscope, 'y', { + get: function(){ return valueY; }, + enumerable: true + }); + Object.defineProperty(gyroscope, 'z', { + get: function(){ return valueZ; }, + enumerable: true + }); + + WebView.onEvent('gyroscope_started', onGyroscopeStarted); + WebView.onEvent('gyroscope_stopped', onGyroscopeStopped); + WebView.onEvent('gyroscope_changed', onGyroscopeChanged); + WebView.onEvent('gyroscope_failed', onGyroscopeFailed); + + function onGyroscopeStarted(eventType, eventData) { + isStarted = true; + if (startCallbacks.length > 0) { + for (var i = 0; i < startCallbacks.length; i++) { + var callback = startCallbacks[i]; + callback(true); + } + startCallbacks = []; + } + receiveWebViewEvent('gyroscopeStarted'); + } + function onGyroscopeStopped(eventType, eventData) { + isStarted = false; + if (stopCallbacks.length > 0) { + for (var i = 0; i < stopCallbacks.length; i++) { + var callback = stopCallbacks[i]; + callback(true); + } + stopCallbacks = []; + } + receiveWebViewEvent('gyroscopeStopped'); + } + function onGyroscopeChanged(eventType, eventData) { + valueX = eventData.x; + valueY = eventData.y; + valueZ = eventData.z; + receiveWebViewEvent('gyroscopeChanged'); + } + function onGyroscopeFailed(eventType, eventData) { + if (startCallbacks.length > 0) { + for (var i = 0; i < startCallbacks.length; i++) { + var callback = startCallbacks[i]; + callback(false); + } + startCallbacks = []; + } + receiveWebViewEvent('gyroscopeFailed', { + error: eventData.error + }); + } + + function checkVersion() { + if (!versionAtLeast('8.0')) { + console.warn('[Telegram.WebApp] Gyroscope is not supported in version ' + webAppVersion); + return false; + } + return true; + } + + gyroscope.start = function(params, callback) { + params = params || {}; + if (!checkVersion()) { + return gyroscope; + } + var req_params = {}; + var refresh_rate = parseInt(params.refresh_rate || 1000); + if (isNaN(refresh_rate) || refresh_rate < 20 || refresh_rate > 1000) { + console.warn('[Telegram.WebApp] Gyroscope refresh_rate is invalid', refresh_rate); + } else { + req_params.refresh_rate = refresh_rate; + } + + if (callback) { + startCallbacks.push(callback); + } + WebView.postEvent('web_app_start_gyroscope', false, req_params); + return gyroscope; + }; + gyroscope.stop = function(callback) { + if (!checkVersion()) { + return gyroscope; + } + if (callback) { + stopCallbacks.push(callback); + } + WebView.postEvent('web_app_stop_gyroscope'); + return gyroscope; + }; + return gyroscope; + })(); + var webAppInvoices = {}; function onInvoiceClosed(eventType, eventData) { if (eventData.slug && webAppInvoices[eventData.slug]) { @@ -1678,6 +2411,21 @@ } } + var webAppDownloadFileRequested = false; + function onFileDownloadRequested(eventType, eventData) { + if (webAppDownloadFileRequested) { + var requestData = webAppDownloadFileRequested; + webAppDownloadFileRequested = false; + var isDownloading = eventData.status == 'downloading'; + if (requestData.callback) { + requestData.callback(isDownloading); + } + receiveWebViewEvent('fileDownloadRequested', { + status: isDownloading ? 'downloading' : 'cancelled' + }); + } + } + function onCustomMethodInvoked(eventType, eventData) { if (eventData.req_id && webAppCallbacks[eventData.req_id]) { var requestData = webAppCallbacks[eventData.req_id]; @@ -1748,6 +2496,14 @@ get: function(){ return (viewportStableHeight === false ? window.innerHeight : viewportStableHeight) - bottomBarHeight; }, enumerable: true }); + Object.defineProperty(WebApp, 'safeAreaInset', { + get: function(){ return safeAreaInset; }, + enumerable: true + }); + Object.defineProperty(WebApp, 'contentSafeAreaInset', { + get: function(){ return contentSafeAreaInset; }, + enumerable: true + }); Object.defineProperty(WebApp, 'isClosingConfirmationEnabled', { set: function(val){ setClosingConfirmation(val); }, get: function(){ return isClosingConfirmationEnabled; }, @@ -1758,6 +2514,19 @@ get: function(){ return isVerticalSwipesEnabled; }, enumerable: true }); + Object.defineProperty(WebApp, 'isFullscreen', { + get: function(){ return webAppIsFullscreen; }, + enumerable: true + }); + Object.defineProperty(WebApp, 'isOrientationLocked', { + set: function(val){ toggleOrientationLock(val); }, + get: function(){ return webAppIsOrientationLocked; }, + enumerable: true + }); + Object.defineProperty(WebApp, 'isActive', { + get: function(){ return webAppIsActive; }, + enumerable: true + }); Object.defineProperty(WebApp, 'headerColor', { set: function(val){ setHeaderColor(val); }, get: function(){ return getHeaderColor(); }, @@ -1801,6 +2570,25 @@ value: BiometricManager, enumerable: true }); + Object.defineProperty(WebApp, 'Accelerometer', { + value: Accelerometer, + enumerable: true + }); + Object.defineProperty(WebApp, 'DeviceOrientation', { + value: DeviceOrientation, + enumerable: true + }); + Object.defineProperty(WebApp, 'Gyroscope', { + value: Gyroscope, + enumerable: true + }); + Object.defineProperty(WebApp, 'LocationManager', { + value: LocationManager, + enumerable: true + }); + WebApp.isVersionAtLeast = function(ver) { + return versionAtLeast(ver); + }; WebApp.setHeaderColor = function(color_key) { WebApp.headerColor = color_key; }; @@ -1822,8 +2610,42 @@ WebApp.disableVerticalSwipes = function() { WebApp.isVerticalSwipesEnabled = false; }; - WebApp.isVersionAtLeast = function(ver) { - return versionAtLeast(ver); + WebApp.lockOrientation = function() { + WebApp.isOrientationLocked = true; + }; + WebApp.unlockOrientation = function() { + WebApp.isOrientationLocked = false; + }; + WebApp.requestFullscreen = function() { + if (!versionAtLeast('8.0')) { + console.error('[Telegram.WebApp] Method requestFullscreen is not supported in version ' + webAppVersion); + throw Error('WebAppMethodUnsupported'); + } + WebView.postEvent('web_app_request_fullscreen'); + }; + WebApp.exitFullscreen = function() { + if (!versionAtLeast('8.0')) { + console.error('[Telegram.WebApp] Method exitFullscreen is not supported in version ' + webAppVersion); + throw Error('WebAppMethodUnsupported'); + } + WebView.postEvent('web_app_exit_fullscreen'); + }; + WebApp.addToHomeScreen = function() { + if (!versionAtLeast('8.0')) { + console.error('[Telegram.WebApp] Method addToHomeScreen is not supported in version ' + webAppVersion); + throw Error('WebAppMethodUnsupported'); + } + WebView.postEvent('web_app_add_to_home_screen'); + }; + WebApp.checkHomeScreenStatus = function(callback) { + if (!versionAtLeast('8.0')) { + console.error('[Telegram.WebApp] Method checkHomeScreenStatus is not supported in version ' + webAppVersion); + throw Error('WebAppMethodUnsupported'); + } + if (callback) { + homeScreenCallbacks.push(callback); + } + WebView.postEvent('web_app_check_home_screen'); }; WebApp.onEvent = function(eventType, callback) { onWebViewEvent(eventType, callback); @@ -2141,6 +2963,40 @@ }; WebView.postEvent('web_app_request_phone'); }; + WebApp.downloadFile = function (params, callback) { + if (!versionAtLeast('8.0')) { + console.error('[Telegram.WebApp] Method downloadFile is not supported in version ' + webAppVersion); + throw Error('WebAppMethodUnsupported'); + } + if (webAppDownloadFileRequested) { + console.error('[Telegram.WebApp] Popup is already opened'); + throw Error('WebAppDownloadFilePopupOpened'); + } + var a = document.createElement('A'); + + var dl_params = {}; + if (!params || !params.url || !params.url.length) { + console.error('[Telegram.WebApp] Url is required'); + throw Error('WebAppDownloadFileParamInvalid'); + } + a.href = params.url; + if (a.protocol != 'https:') { + console.error('[Telegram.WebApp] Url protocol is not supported', url); + throw Error('WebAppDownloadFileParamInvalid'); + } + dl_params.url = a.href; + + if (!params || !params.file_name || !params.file_name.length) { + console.error('[Telegram.WebApp] File name is required'); + throw Error('WebAppDownloadFileParamInvalid'); + } + dl_params.file_name = params.file_name; + + webAppDownloadFileRequested = { + callback: callback + }; + WebView.postEvent('web_app_request_file_download', false, dl_params); + }; WebApp.shareToStory = function (media_url, params) { params = params || {}; if (!versionAtLeast('7.8')) { @@ -2192,6 +3048,54 @@ WebView.postEvent('web_app_share_to_story', false, share_params); }; + WebApp.shareMessage = function (msg_id, callback) { + if (!versionAtLeast('8.0')) { + console.error('[Telegram.WebApp] Method shareMessage is not supported in version ' + webAppVersion); + throw Error('WebAppMethodUnsupported'); + } + if (WebAppShareMessageOpened) { + console.error('[Telegram.WebApp] Share message is already opened'); + throw Error('WebAppShareMessageOpened'); + } + WebAppShareMessageOpened = { + callback: callback + }; + WebView.postEvent('web_app_send_prepared_message', false, {id: msg_id}); + }; + WebApp.setEmojiStatus = function (custom_emoji_id, params, callback) { + params = params || {}; + if (!versionAtLeast('8.0')) { + console.error('[Telegram.WebApp] Method setEmojiStatus is not supported in version ' + webAppVersion); + throw Error('WebAppMethodUnsupported'); + } + var status_params = {}; + status_params.custom_emoji_id = custom_emoji_id; + if (typeof params.duration !== 'undefined') { + status_params.duration = params.duration; + } + if (WebAppEmojiStatusRequested) { + console.error('[Telegram.WebApp] Emoji status is already requested'); + throw Error('WebAppEmojiStatusRequested'); + } + WebAppEmojiStatusRequested = { + callback: callback + }; + WebView.postEvent('web_app_set_emoji_status', false, status_params); + }; + WebApp.requestEmojiStatusAccess = function (callback) { + if (!versionAtLeast('8.0')) { + console.error('[Telegram.WebApp] Method requestEmojiStatusAccess is not supported in version ' + webAppVersion); + throw Error('WebAppMethodUnsupported'); + } + if (WebAppEmojiStatusAccessRequested) { + console.error('[Telegram.WebApp] Emoji status permission is already requested'); + throw Error('WebAppEmojiStatusAccessRequested'); + } + WebAppEmojiStatusAccessRequested = { + callback: callback + }; + WebView.postEvent('web_app_request_emoji_status_access'); + }; WebApp.invokeCustomMethod = function (method, params, callback) { invokeCustomMethod(method, params, callback); }; @@ -2227,6 +3131,9 @@ WebView.onEvent('theme_changed', onThemeChanged); WebView.onEvent('viewport_changed', onViewportChanged); + WebView.onEvent('safe_area_changed', onSafeAreaChanged); + WebView.onEvent('content_safe_area_changed', onContentSafeAreaChanged); + WebView.onEvent('visibility_changed', onVisibilityChanged); WebView.onEvent('invoice_closed', onInvoiceClosed); WebView.onEvent('popup_closed', onPopupClosed); WebView.onEvent('qr_text_received', onQrTextReceived); @@ -2234,8 +3141,20 @@ WebView.onEvent('clipboard_text_received', onClipboardTextReceived); WebView.onEvent('write_access_requested', onWriteAccessRequested); WebView.onEvent('phone_requested', onPhoneRequested); + WebView.onEvent('file_download_requested', onFileDownloadRequested); WebView.onEvent('custom_method_invoked', onCustomMethodInvoked); + WebView.onEvent('fullscreen_changed', onFullscreenChanged); + WebView.onEvent('fullscreen_failed', onFullscreenFailed); + WebView.onEvent('home_screen_added', onHomeScreenAdded); + WebView.onEvent('home_screen_checked', onHomeScreenChecked); + WebView.onEvent('prepared_message_sent', onPreparedMessageSent); + WebView.onEvent('prepared_message_failed', onPreparedMessageFailed); + WebView.onEvent('emoji_status_set', onEmojiStatusSet); + WebView.onEvent('emoji_status_failed', onEmojiStatusFailed); + WebView.onEvent('emoji_status_access_requested', onEmojiStatusAccessRequested); WebView.postEvent('web_app_request_theme'); WebView.postEvent('web_app_request_viewport'); + WebView.postEvent('web_app_request_safe_area'); + WebView.postEvent('web_app_request_content_safe_area'); })(); diff --git a/data/web/telegram.org/privacy-tpa..html b/data/web/telegram.org/privacy-tpa..html index 0a9d57eb5e..c17eb069fd 100644 --- a/data/web/telegram.org/privacy-tpa..html +++ b/data/web/telegram.org/privacy-tpa..html @@ -50,15 +50,15 @@ @@ -109,20 +109,20 @@ Recent News diff --git a/data/web/telegram.org/t.me/PremiumBot.html b/data/web/telegram.org/t.me/PremiumBot.html index 0a9d57eb5e..c17eb069fd 100644 --- a/data/web/telegram.org/t.me/PremiumBot.html +++ b/data/web/telegram.org/t.me/PremiumBot.html @@ -50,15 +50,15 @@ @@ -109,20 +109,20 @@ Recent News diff --git a/data/web/telegram.org/what-can-you-do-with-Telegram.html b/data/web/telegram.org/what-can-you-do-with-Telegram.html index 0a9d57eb5e..c17eb069fd 100644 --- a/data/web/telegram.org/what-can-you-do-with-Telegram.html +++ b/data/web/telegram.org/what-can-you-do-with-Telegram.html @@ -50,15 +50,15 @@ @@ -109,20 +109,20 @@ Recent News diff --git a/data/web/webappcontent.telegram.org/js/webappdemo.js b/data/web/webappcontent.telegram.org/js/webappdemo.js index 0d1830a72f..71532d8569 100644 --- a/data/web/webappcontent.telegram.org/js/webappdemo.js +++ b/data/web/webappcontent.telegram.org/js/webappdemo.js @@ -107,10 +107,15 @@ var DemoApp = { $('#webview_data_status').hasClass('status_need')) { $('#webview_data_status').removeClass('status_need'); DemoApp.apiRequest('checkInitData', {}, function(result) { - if (result.ok) { + if (result.hash_status) { $('#webview_data_status').text('Hash is correct (async)').addClass('ok'); } else { - $('#webview_data_status').text(result.error + ' (async)').addClass('err'); + $('#webview_data_status').text('Hash invalid (async)').addClass('err'); + } + if (result.sign_status) { + $('#webview_data_sign_status').text('Signature is correct (async)').addClass('ok'); + } else { + $('#webview_data_sign_status').text('Signature invalid (async)').addClass('err'); } }); }