Update tracked links

This commit is contained in:
GitHub Action 2021-04-24 12:28:52 +00:00
parent 23fd7d08ad
commit 0740c2c117
354 changed files with 357015 additions and 0 deletions

924
data/bugs.telegram.org.html Normal file
View file

@ -0,0 +1,924 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Bugs and Suggestions</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<meta name="format-detection" content="telephone=no" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="MobileOptimized" content="176" />
<meta name="HandheldFriendly" content="True" />
<link rel="shortcut icon" href="/img/bt_favicon.ico" type="image/x-icon" />
<link rel="mask-icon" href="/img/bt_icon.svg" color="#238fe1">
<script>document.cookie="stel_dt="+encodeURIComponent((new Date).getTimezoneOffset())+";path=/;max-age=31536000;samesite=None;secure"</script>
<link href="https://fonts.googleapis.com/css?family=Roboto:400,500,700" rel="stylesheet" type="text/css">
<link href="/css/bootstrap.min.css?3" rel="stylesheet">
<link href="/css/bootstrap-extra.css?2" rel="stylesheet">
<link href="/css/telegram.css?212" rel="stylesheet">
<link href="/css/bugtracker.css?68" rel="stylesheet">
<link href="/css/bugtracker-bugs.css?4" rel="stylesheet">
<link href="/css/contest-zoo.css?7" rel="stylesheet">
<link href="/css/jquery-ui.min.css" rel="stylesheet">
<link href="/css/codemirror.css?1" rel="stylesheet">
</head>
<body class="emoji_image no-transition">
<svg xmlns="http://www.w3.org/2000/svg" style="display:none">
<defs>
<path id="icon-like" d="m16 14h-1.6c-.44 0-.8-.35-.8-.78v-7c0-.43.36-.78.8-.78h1.6zm-15.86-5.54c-.09-.19-.14-.4-.14-.62v-.84c0-.86.72-1.56 1.6-1.56h4.4l-.74-3.61c-.04-.17-.01-.36.07-.52.18-.35.41-.66.7-.94l.37-.37 5.13 4.99c.3.29.47.69.47 1.1v6.09c0 1-.84 1.82-1.87 1.82h-6.48c-.57 0-1.09-.29-1.38-.75z"/>
<path id="icon-dislike" d="m16 0h-1.6c-.4 0-.8.3-.8.8v7c0 .4.4.8.8.8h1.6zm-15.9 5.5c-.1.2-.1.4-.1.7v.8c0 .9.7 1.6 1.6 1.6h4.4l-.7 3.6c-.1.1-.1.3 0 .5.2.3.4.7.7.9l.4.4 5.1-5c.3-.3.5-.7.5-1.1v-6.1c0-1-.8-1.8-1.9-1.8h-6.5c-.5 0-1 .3-1.3.8z"/>
<path id="icon-replies" d="m5.951.078-.072.061-5.73 5.911c-.192.198-.214.5-.066.723l.063.079 5.731 6.007c.088.091.209.143.336.143.228 0 .417-.164.457-.38l.006-.072v-3.374c.106-.006.211-.01.318-.013l.319-.004c2.919 0 5.42.819 7.179 2.457.121-.075.284-.109.463-.124l.045.263c-.511-3.167-1.332-4.236-2.573-5.476-1.348-1.345-3.132-2.19-5.353-2.536l-.397-.056v-3.225c0-.126-.051-.246-.141-.333-.161-.157-.406-.173-.585-.051z"/>
<path id="icon-subscribe" d="m9.47 14c.07.16.12.32.12.5c0 .83-.9 1.5-2 1.5c-1.11 0-2-.67-2-1.5c0-.18.04-.34.11-.5zm-1.88-14c.55 0 1 .45 1 1v.1c2.28.46 4 2.48 4 4.9v4l1.29 1.29c.39.39.39 1.03 0 1.42c-.19.18-.44.29-.71.29h-11.17c-.55 0-1-.45-1-1c0-.27.11-.52.29-.71l1.3-1.29v-4c0-2.42 1.71-4.44 4-4.9v-.1c0-.55.44-1 1-1z"/>
<path id="icon-trending" d="m7.5 11.96-3.62 2.14c-.4.24-.92.1-1.15-.3-.11-.18-.15-.4-.1-.61l.91-4.1-3.15-2.79c-.35-.31-.38-.84-.07-1.19.14-.16.33-.26.54-.28l4.19-.4 1.68-3.86c.18-.42.68-.62 1.1-.43.2.08.36.24.44.43l1.68 3.86 4.19.4c.46.05.8.46.75.92-.02.21-.12.41-.28.55l-3.15 2.79.91 4.1c.1.46-.18.91-.64 1.01-.2.04-.42.01-.61-.1z"></path>
<path id="icon-copy" d="m17.8 13.3c.7 0 1.2.5 1.2 1.2v1c0 3.6-2.9 6.5-6.5 6.5s-6.5-2.9-6.5-6.5v-1c0-.7.5-1.2 1.2-1.2s1.2.5 1.2 1.2v1c0 2.3 1.8 4.1 4.1 4.1s4.1-1.8 4.1-4.1v-1c0-.7.5-1.2 1.2-1.2zm-5.3-5.3c.7 0 1.3.6 1.3 1.3v5.4c0 .7-.6 1.3-1.3 1.3s-1.3-.6-1.3-1.3v-5.4c0-.7.6-1.3 1.3-1.3zm0-6c3.6 0 6.5 2.9 6.5 6.5v1c0 .7-.5 1.2-1.2 1.2s-1.2-.5-1.2-1.2v-1c0-2.3-1.8-4.1-4.1-4.1s-4.1 1.8-4.1 4.1v1c0 .7-.5 1.2-1.2 1.2s-1.2-.5-1.2-1.2v-1c0-3.6 2.9-6.5 6.5-6.5z" transform="matrix(.70710678 .70710678 -.70710678 .70710678 9.146447 -8.324116)"/>
<g id="icon-arrow" fill-rule="evenodd"><rect height="2" rx="1" width="13" x="5" y="11"/><rect height="2.2" rx="1.1" transform="rotate(135 18 12.1)" width="10" x="16.9" y="11"/><rect height="2.2" rx="1.1" transform="rotate(-135, 18, 11.9)" width="10" x="16.9" y="10.8"/></g>
<g id="icon-close" fill-rule="evenodd"><rect id="icon-part1" height="16" rx="1.05" transform="rotate(-45 12 12)" width="2.1" x="10.95" y="3.95"/><use transform="rotate(90 12 12)" xlink:href="#icon-part1"/></g>
<g id="icon-layer-close" fill-rule="evenodd"><rect id="icon-part2" height="19" rx="1.25" transform="rotate(-45 12 12)" width="2.5" x="10.75" y="2.25"/><use transform="rotate(90 12 12)" xlink:href="#icon-part2"/></g>
<g id="icon-dd" fill-rule="evenodd"><path d="m.78.69c-.38.33-.42.91-.08 1.29.02.03.05.06.08.08l4.81 4.25c.44.4 1.11.4 1.55 0 .38-.33.42-.91.08-1.29-.02-.03-.05-.06-.08-.08l-4.81-4.25c-.44-.4-1.11-.4-1.55 0z"/><path d="m12.14.69c.38.33.42.91.08 1.29-.02.03-.05.06-.08.08l-4.81 4.25c-.44.4-1.11.4-1.55 0-.38-.33-.42-.91-.08-1.29.02-.03.05-.06.08-.08l4.81-4.25c.44-.4 1.11-.4 1.55 0z"/></g>
</defs>
</svg>
<div id="aj_progress" class="progress-bar"></div>
<div id="aj_content"><div class="bt-container">
<header>
<div class="container">
<div class="header-wrap">
<div id="header-panel" class="header-panel">
<div class="header-auth">
<div class="header-auth-item"><a class="header-auth-link login-link" href="/auth">Login</a></div>
</div>
<div class="header-breadcrumb header-breadcrumb-simple">
<ol id="breadcrumb" class="header-nav breadcrumb"><li class="cd-logo"><a href="/"><i class="cd-icon"></i><span class="cd-logo-title">Bugs and Suggestions</span></a></li></ol>
</div>
</div>
</div>
</div>
</header><header class="bt-search-header sticky">
<div class="sticky-box">
<div class="container">
<section class="bt-search">
<form action="/" class="cd-form bt-main-search-form">
<input type="hidden" name="type" value="" />
<input type="hidden" name="sort" value="rate" />
<div class="form-group">
<div class="bt-form-input cd-form-select bt-select-query">
<div class="select" data-name="filters" data-value="">
<div class="select-enter"><svg class="icon"><use xlink:href="#icon-arrow"/></svg></div>
<span class="select-clear"><svg class="icon"><use xlink:href="#icon-close"/></svg></span>
<div class="selected-items">
<input type="search" class="form-control cd-form-control" placeholder="Describe your issue or suggestion" name="query" value="" autocomplete="off" />
</div>
<div class="items-list"></div>
</div>
</div>
</div>
</form>
<div class="bt-search-tabs">
<span class="bt-search-tab">All</span><a href="/?type=issues&sort=rate" class="bt-search-tab">Issues</a><a href="/?type=suggestions&sort=rate" class="bt-search-tab">Suggestions</a><span class="bt-search-tabs-right"></span>
</div>
</section>
</div>
</div>
</header>
<main class="container"><section class="cd-content with-trending">
<span class="bt-sort-wrap" data-value="rate">
<a class="bt-sort-item selected" data-value="rate">by rating</a>
<a class="bt-sort-item" data-value="time">by time</a>
</span><h3 class="bt-header" data-count="3377">3377 Cards</h3>
<a href="/c/746" data-layer class="bt-card-row trending" data-card-id="746">
<div class="bt-card-thumb thumb-animal thumb-icon cock thumb-color2"><span class="bt-card-thumb-status">Added</span></div>
<div class="bt-card-row-body">
<div class="bt-card-title">
About this platform
</div>
<div class="bt-card-preview"> All users are welcome to create new entries, view existing entries and vote on them. What is this for? This platform is a place where users can vote for feature suggestions for Telegram or report issues…</div>
<div class="bt-issue-footer-wrap">
<div class="bt-issue-footer">
<time datetime="2020-12-23T14:57:58+00:00" title="Dec 23, 2020 at 14:57" class="short">Dec 23, 2020</time><span class="bt-card-status"><span class="add-info">Closed</span></span><span class="add-info">Tip</span>
</div>
<div class="bt-issue-counters likes-wrap"><span class="cd-issue-replies"><span class="value">54</span><svg class="icon"><use xlink:href="#icon-replies"/></svg></span><span class="bt-issue-trending"><svg class="icon"><use xlink:href="#icon-trending"/></svg></span><span class="cd-issue-like"><span class="value">127</span><svg class="icon"><use xlink:href="#icon-like"/></svg></span></div>
</div>
</div>
</a><a href="/c/203" data-layer class="bt-card-row trending" data-card-id="203">
<div class="bt-card-thumb thumb-issue thumb-icon bumblebee thumb-color3"><span class="bt-card-thumb-status">Fixed</span></div>
<div class="bt-card-row-body">
<div class="bt-card-title">
iOS badge counter shows unread messages, even when all chats are read
</div>
<div class="bt-card-preview">Badge counters inside the app and on the app&#39;s icon may sometimes show unread messages while there are no unread chats in the list. Workaround Tap 10 times on the Settings tab icon &gt; Reindex Unread Counters.…</div>
<div class="bt-issue-footer-wrap">
<div class="bt-issue-footer">
<time datetime="2020-11-12T22:16:24+00:00" title="Nov 12, 2020 at 22:16" class="short">Nov 12, 2020</time><span class="bt-card-status"></span><span class="add-info">Issue, iOS</span>
</div>
<div class="bt-issue-counters likes-wrap"><span class="cd-issue-replies"><span class="value">9</span><svg class="icon"><use xlink:href="#icon-replies"/></svg></span><span class="bt-issue-trending"><svg class="icon"><use xlink:href="#icon-trending"/></svg></span><span class="cd-issue-like"><span class="value">73</span><svg class="icon"><use xlink:href="#icon-like"/></svg></span></div>
</div>
</div>
</a><a href="/c/174" data-layer class="bt-card-row trending" data-card-id="174">
<div class="bt-card-thumb thumb-issue" style="background-image:url('https://telegra.ph/file/thumb/e077bab5998914d8285c9.jpg')"><span class="bt-card-thumb-status">Fixed</span></div>
<div class="bt-card-row-body">
<div class="bt-card-title">
&quot;You have a new message&quot; notifications in Notification Center
</div>
<div class="bt-card-preview">Workaround Restarting the device should fix the issue. Notifications will arrive with proper message previews after reboot. &#39;You have a new message&#39; notifications arrive instead of regular notifications…</div>
<div class="bt-issue-footer-wrap">
<div class="bt-issue-footer">
<time datetime="2020-11-12T17:13:34+00:00" title="Nov 12, 2020 at 17:13" class="short">Nov 12, 2020</time><span class="bt-card-status"></span><span class="add-info">Issue, iOS</span>
</div>
<div class="bt-issue-counters likes-wrap"><span class="cd-issue-replies"><span class="value">12</span><svg class="icon"><use xlink:href="#icon-replies"/></svg></span><span class="bt-issue-trending"><svg class="icon"><use xlink:href="#icon-trending"/></svg></span><span class="cd-issue-like"><span class="value">67</span><svg class="icon"><use xlink:href="#icon-like"/></svg></span></div>
</div>
</div>
</a><a href="/c/187" data-layer class="bt-card-row trending" data-card-id="187">
<div class="bt-card-thumb thumb-issue thumb-icon madagascar-cockroach thumb-color3"><span class="bt-card-thumb-status">Fixed</span></div>
<div class="bt-card-row-body">
<div class="bt-card-title">
Distorted voice messages
</div>
<div class="bt-card-preview">Voice messages on iOS 14 devices can get broken (audio is slow, distorted). A short 5-second voice message changes in speed and duration. Workaround Disable the &#39;Sound Recognition&#39; feature in iOS Settings…</div>
<div class="bt-issue-footer-wrap">
<div class="bt-issue-footer">
<time datetime="2020-11-12T21:26:47+00:00" title="Nov 12, 2020 at 21:26" class="short">Nov 12, 2020</time><span class="bt-card-status"></span><span class="add-info">iOS, Issue</span>
</div>
<div class="bt-issue-counters likes-wrap"><span class="bt-issue-trending"><svg class="icon"><use xlink:href="#icon-trending"/></svg></span><span class="cd-issue-like"><span class="value">15</span><svg class="icon"><use xlink:href="#icon-like"/></svg></span></div>
</div>
</div>
</a><a href="/c/724" data-layer class="bt-card-row" data-card-id="724">
<div class="bt-card-thumb thumb-feature thumb-icon carambola thumb-color4"><span class="bt-card-thumb-status">Added</span></div>
<div class="bt-card-row-body">
<div class="bt-card-title">
Improve the ability to search chat history for Asian regional languages, such as Chinese and Japanese
</div>
<div class="bt-card-preview">Improve the ability to search chat history for Asian regional languages, such as Chinese and Japanese. Telegram&#39;s chat history search function is based on words, and is suitable for languages such as…</div>
<div class="bt-issue-footer-wrap">
<div class="bt-issue-footer">
<time datetime="2020-12-23T08:56:29+00:00" title="Dec 23, 2020 at 08:56" class="short">Dec 23, 2020</time><span class="bt-card-status"></span><span class="add-info">Suggestion, General</span>
</div>
<div class="bt-issue-counters likes-wrap"><span class="cd-issue-replies"><span class="value">51</span><svg class="icon"><use xlink:href="#icon-replies"/></svg></span><span class="cd-issue-like"><span class="value">2178</span><svg class="icon"><use xlink:href="#icon-like"/></svg></span></div>
</div>
</div>
</a><a href="/c/23" data-layer class="bt-card-row" data-card-id="23">
<div class="bt-card-thumb thumb-feature thumb-icon pear thumb-color7"><span class="bt-card-thumb-status">Added</span></div>
<div class="bt-card-row-body">
<div class="bt-card-title">
Emoji reactions
</div>
<div class="bt-card-preview">An option to react to messages using small emoji (e.g.<i class="emoji" style="background-image:url('//telegram.org/img/emoji/40/F09F918D.png')"><b>👍</b></i>,<i class="emoji" style="background-image:url('//telegram.org/img/emoji/40/E29DA4.png')"><b>❤️</b></i>,<i class="emoji" style="background-image:url('//telegram.org/img/emoji/40/F09F918E.png')"><b>👎</b></i>) instead of replying in the chat with messages or stickers. Use Cases 1. Quick feedback that doesn&#39;t take up space in the message history.…</div>
<div class="bt-issue-footer-wrap">
<div class="bt-issue-footer">
<time datetime="2019-11-05T14:57:58+00:00" title="Nov 5, 2019 at 14:57" class="short">Nov 5, 2019</time><span class="bt-card-status"></span><span class="add-info">Suggestion</span>
</div>
<div class="bt-issue-counters likes-wrap"><span class="cd-issue-replies"><span class="value">234</span><svg class="icon"><use xlink:href="#icon-replies"/></svg></span><span class="cd-issue-like"><span class="value">1638</span><svg class="icon"><use xlink:href="#icon-like"/></svg></span></div>
</div>
</div>
</a><a href="/c/67" data-layer class="bt-card-row" data-card-id="67">
<div class="bt-card-thumb thumb-feature thumb-icon pitaya thumb-color3"><span class="bt-card-thumb-status">Added</span></div>
<div class="bt-card-row-body">
<div class="bt-card-title">
Group Video Calls
</div>
<div class="bt-card-preview">Encrypted video calls with three or more people. Telegram has announced plans to launch group video calls in the coming months. Related suggestions: Group Voice Calls, Screen Sharing in Calls</div>
<div class="bt-issue-footer-wrap">
<div class="bt-issue-footer">
<time datetime="2019-12-11T11:50:20+00:00" title="Dec 11, 2019 at 11:50" class="short">Dec 11, 2019</time><span class="bt-card-status"></span><span class="add-info">Suggestion, Calls</span>
</div>
<div class="bt-issue-counters likes-wrap"><span class="cd-issue-replies"><span class="value">40</span><svg class="icon"><use xlink:href="#icon-replies"/></svg></span><span class="cd-issue-like"><span class="value">1401</span><svg class="icon"><use xlink:href="#icon-like"/></svg></span></div>
</div>
</div>
</a><a href="/c/808" data-layer class="bt-card-row" data-card-id="808">
<div class="bt-card-thumb thumb-feature" style="background-image:url('https://telegra.ph/file/thumb/c3fd10f0757f15620128f-07424df37b0faa0dc4.jpg')"><span class="bt-card-thumb-status">Added</span></div>
<div class="bt-card-row-body">
<div class="bt-card-title">
Cryptocurrency donations for bots, groups and channels
</div>
<div class="bt-card-preview">Show a button for sending quick donations to maintainers of bots, groups or channels using cryptocurrency. This could use either an established cryptocurrency like Bitcoin, Etherium, EOS, etc. or some…</div>
<div class="bt-issue-footer-wrap">
<div class="bt-issue-footer">
<time datetime="2020-12-25T09:04:53+00:00" title="Dec 25, 2020 at 09:04" class="short">Dec 25, 2020</time><span class="bt-card-status"></span><span class="add-info">Suggestion, General</span>
</div>
<div class="bt-issue-counters likes-wrap"><span class="cd-issue-replies"><span class="value">73</span><svg class="icon"><use xlink:href="#icon-replies"/></svg></span><span class="cd-issue-like"><span class="value">1244</span><svg class="icon"><use xlink:href="#icon-like"/></svg></span></div>
</div>
</div>
</a><a href="/c/736" data-layer class="bt-card-row" data-card-id="736">
<div class="bt-card-thumb thumb-feature thumb-icon lychee thumb-color0"><span class="bt-card-thumb-status">Added</span></div>
<div class="bt-card-row-body">
<div class="bt-card-title">
Screen sharing in calls
</div>
<div class="bt-card-preview">Screen sharing from mobile and desktop apps, in one-on-one calls and voice chats (also in group calls when they become available).</div>
<div class="bt-issue-footer-wrap">
<div class="bt-issue-footer">
<time datetime="2020-12-23T13:48:01+00:00" title="Dec 23, 2020 at 13:48" class="short">Dec 23, 2020</time><span class="bt-card-status"></span><span class="add-info">Suggestion</span>
</div>
<div class="bt-issue-counters likes-wrap"><span class="cd-issue-replies"><span class="value">49</span><svg class="icon"><use xlink:href="#icon-replies"/></svg></span><span class="cd-issue-like"><span class="value">998</span><svg class="icon"><use xlink:href="#icon-like"/></svg></span></div>
</div>
</div>
</a><a href="/c/82" data-layer class="bt-card-row" data-card-id="82">
<div class="bt-card-thumb thumb-feature thumb-icon banana thumb-color2"><span class="bt-card-thumb-status">Added</span></div>
<div class="bt-card-row-body">
<div class="bt-card-title">
Silent sign up
</div>
<div class="bt-card-preview">A feature to join Telegram incognito, making the phone number privacy set to Nobody before creating a new account. Current users who have that number added to their contacts list will not get a new c…</div>
<div class="bt-issue-footer-wrap">
<div class="bt-issue-footer">
<time datetime="2019-12-12T06:44:44+00:00" title="Dec 12, 2019 at 06:44" class="short">Dec 12, 2019</time><span class="bt-card-status"></span><span class="add-info">Suggestion</span>
</div>
<div class="bt-issue-counters likes-wrap"><span class="cd-issue-replies"><span class="value">39</span><svg class="icon"><use xlink:href="#icon-replies"/></svg></span><span class="cd-issue-like"><span class="value">913</span><svg class="icon"><use xlink:href="#icon-like"/></svg></span></div>
</div>
</div>
</a><a href="/c/80" data-layer class="bt-card-row" data-card-id="80">
<div class="bt-card-thumb thumb-feature thumb-icon apple thumb-color0"><span class="bt-card-thumb-status">Added</span></div>
<div class="bt-card-row-body">
<div class="bt-card-title">
Live video streaming
</div>
<div class="bt-card-preview">A feature to share and experience live videos across groups and channels in Telegram. Broadcasting from a channel or your personal account (in group chats) so that others can view, react, and interact.</div>
<div class="bt-issue-footer-wrap">
<div class="bt-issue-footer">
<time datetime="2019-12-12T06:27:07+00:00" title="Dec 12, 2019 at 06:27" class="short">Dec 12, 2019</time><span class="bt-card-status"></span><span class="add-info">iOS, Android, macOS, Telegram Desktop, Suggestion</span>
</div>
<div class="bt-issue-counters likes-wrap"><span class="cd-issue-replies"><span class="value">38</span><svg class="icon"><use xlink:href="#icon-replies"/></svg></span><span class="cd-issue-like"><span class="value">825</span><svg class="icon"><use xlink:href="#icon-like"/></svg></span></div>
</div>
</div>
</a><a href="/c/2775" data-layer class="bt-card-row" data-card-id="2775">
<div class="bt-card-thumb thumb-feature" style="background-image:url('https://telegra.ph/file/thumb/2320d5aaba534ba33185a-b2bbc7ded6b5481c1d.jpg')"><div class="bt-card-thumb-label">1:52</div><span class="bt-card-thumb-status">Added</span></div>
<div class="bt-card-row-body">
<div class="bt-card-title">
Emergency passcode to hide chats
</div>
<div class="bt-card-preview">Option to set an alternative passcode (&quot;double bottom&quot;) that either opens a limited set of chats, opens a different account, or destroys one of the connected accounts completely when entered. Use cases…</div>
<div class="bt-issue-footer-wrap">
<div class="bt-issue-footer">
<time datetime="2021-02-27T23:18:55+00:00" title="Feb 27 at 23:18" class="short">Feb 27</time><span class="bt-card-status"></span><span class="add-info">Suggestion</span>
</div>
<div class="bt-issue-counters likes-wrap"><span class="cd-issue-replies"><span class="value">18</span><svg class="icon"><use xlink:href="#icon-replies"/></svg></span><span class="cd-issue-like"><span class="value">732</span><svg class="icon"><use xlink:href="#icon-like"/></svg></span></div>
</div>
</div>
</a><a href="/c/383" data-layer class="bt-card-row" data-card-id="383">
<div class="bt-card-thumb thumb-feature thumb-icon pear thumb-color7"><span class="bt-card-thumb-status">Added</span></div>
<div class="bt-card-row-body">
<div class="bt-card-title">
Choose a different default folder instead of &quot;All Chats&quot;
</div>
<div class="bt-card-preview">An option to pin one of your folders as the main folder instead of All Chats. When you open the app, it would show you the folder you chose. Pressing the back button would bring you back there when you&#39;re…</div>
<div class="bt-issue-footer-wrap">
<div class="bt-issue-footer">
<time datetime="2020-11-16T23:32:01+00:00" title="Nov 16, 2020 at 23:32" class="short">Nov 16, 2020</time><span class="bt-card-status"></span><span class="add-info">Suggestion</span>
</div>
<div class="bt-issue-counters likes-wrap"><span class="cd-issue-replies"><span class="value">34</span><svg class="icon"><use xlink:href="#icon-replies"/></svg></span><span class="cd-issue-like"><span class="value">690</span><svg class="icon"><use xlink:href="#icon-like"/></svg></span></div>
</div>
</div>
</a><a href="/c/1035" data-layer class="bt-card-row" data-card-id="1035">
<div class="bt-card-thumb thumb-feature thumb-icon strawberry thumb-color3"><span class="bt-card-thumb-status">Added</span></div>
<div class="bt-card-row-body">
<div class="bt-card-title">
Allow site owners to make their own Instant View templates
</div>
<div class="bt-card-preview">Instant View templates are currently created and maintained by Telegram, the list of supported websites is expanded gradually. Some site owners would like to get IV support for their websites sooner.…</div>
<div class="bt-issue-footer-wrap">
<div class="bt-issue-footer">
<time datetime="2021-01-23T17:41:56+00:00" title="Jan 23 at 17:41" class="short">Jan 23</time><span class="bt-card-status"></span><span class="add-info">Suggestion, General</span>
</div>
<div class="bt-issue-counters likes-wrap"><span class="cd-issue-replies"><span class="value">13</span><svg class="icon"><use xlink:href="#icon-replies"/></svg></span><span class="cd-issue-like"><span class="value">673</span><svg class="icon"><use xlink:href="#icon-like"/></svg></span></div>
</div>
</div>
</a><a href="/c/32" data-layer class="bt-card-row" data-card-id="32">
<div class="bt-card-thumb thumb-feature thumb-icon raspberry thumb-color0"><span class="bt-card-thumb-status">Added</span></div>
<div class="bt-card-row-body">
<div class="bt-card-title">
In-app translator
</div>
<div class="bt-card-preview">Translating specific messages via the context menu like Twitter does for tweets. Use cases Built-in translations save a lot of time translating messages on the go would remove the need to move away…</div>
<div class="bt-issue-footer-wrap">
<div class="bt-issue-footer">
<time datetime="2019-11-05T15:18:29+00:00" title="Nov 5, 2019 at 15:18" class="short">Nov 5, 2019</time><span class="bt-card-status"></span><span class="add-info">Suggestion</span>
</div>
<div class="bt-issue-counters likes-wrap"><span class="cd-issue-replies"><span class="value">50</span><svg class="icon"><use xlink:href="#icon-replies"/></svg></span><span class="cd-issue-like"><span class="value">598</span><svg class="icon"><use xlink:href="#icon-like"/></svg></span></div>
</div>
</div>
</a><a href="/c/11" data-layer class="bt-card-row" data-card-id="11">
<div class="bt-card-thumb thumb-feature thumb-icon guava thumb-color3"><span class="bt-card-thumb-status">Added</span></div>
<div class="bt-card-row-body">
<div class="bt-card-title">
Notify all group members
</div>
<div class="bt-card-preview">An option to notify all group members or admins using a special mention (e.g. @all and @admins). Use cases Important news and major updates in big communities. Potential issues Some group admins already…</div>
<div class="bt-issue-footer-wrap">
<div class="bt-issue-footer">
<time datetime="2019-11-04T12:27:14+00:00" title="Nov 4, 2019 at 12:27" class="short">Nov 4, 2019</time><span class="bt-card-status"></span><span class="add-info">Suggestion</span>
</div>
<div class="bt-issue-counters likes-wrap"><span class="cd-issue-replies"><span class="value">40</span><svg class="icon"><use xlink:href="#icon-replies"/></svg></span><span class="cd-issue-like"><span class="value">590</span><svg class="icon"><use xlink:href="#icon-like"/></svg></span></div>
</div>
</div>
</a><a href="/c/68" data-layer class="bt-card-row" data-card-id="68">
<div class="bt-card-thumb thumb-feature thumb-icon plum thumb-color4"><span class="bt-card-thumb-status">Added</span></div>
<div class="bt-card-row-body">
<div class="bt-card-title">
Unlimited favorite stickers
</div>
<div class="bt-card-preview">Increase the limit for favorite stickers. The current limit is five stickers. When you add another one, the first sticker is replaced. Use cases Choose a limited set of stickers which you will always…</div>
<div class="bt-issue-footer-wrap">
<div class="bt-issue-footer">
<time datetime="2019-12-11T12:13:15+00:00" title="Dec 11, 2019 at 12:13" class="short">Dec 11, 2019</time><span class="bt-card-status"></span><span class="add-info">Suggestion</span>
</div>
<div class="bt-issue-counters likes-wrap"><span class="cd-issue-replies"><span class="value">24</span><svg class="icon"><use xlink:href="#icon-replies"/></svg></span><span class="cd-issue-like"><span class="value">531</span><svg class="icon"><use xlink:href="#icon-like"/></svg></span></div>
</div>
</div>
</a><a href="/c/406" data-layer class="bt-card-row" data-card-id="406">
<div class="bt-card-thumb thumb-feature thumb-icon cloudberry thumb-color6"><span class="bt-card-thumb-status">Added</span></div>
<div class="bt-card-row-body">
<div class="bt-card-title">
Alternate profile pictures
</div>
<div class="bt-card-preview">When setting a profile picture or video that&#39;s only visible to contacts (or certain users, groups etc.), allow choosing an alternate picture or video that will be shown to everyone else. Use cases -…</div>
<div class="bt-issue-footer-wrap">
<div class="bt-issue-footer">
<time datetime="2020-11-17T16:48:43+00:00" title="Nov 17, 2020 at 16:48" class="short">Nov 17, 2020</time><span class="bt-card-status"></span><span class="add-info">Suggestion</span>
</div>
<div class="bt-issue-counters likes-wrap"><span class="cd-issue-replies"><span class="value">21</span><svg class="icon"><use xlink:href="#icon-replies"/></svg></span><span class="cd-issue-like"><span class="value">506</span><svg class="icon"><use xlink:href="#icon-like"/></svg></span></div>
</div>
</div>
</a><a href="/c/407" data-layer class="bt-card-row" data-card-id="407">
<div class="bt-card-thumb thumb-feature thumb-icon currant thumb-color7"><span class="bt-card-thumb-status">Added</span></div>
<div class="bt-card-row-body">
<div class="bt-card-title">
Custom icons for folders
</div>
<div class="bt-card-preview">Add the ability to choose icons for folders on mobile platforms like in Telegram Desktop and Telegram macOS. Sync them on all devices. Use cases - Find folders you&#39;re looking for more easily. - Save…</div>
<div class="bt-issue-footer-wrap">
<div class="bt-issue-footer">
<time datetime="2020-11-17T17:11:05+00:00" title="Nov 17, 2020 at 17:11" class="short">Nov 17, 2020</time><span class="bt-card-status"></span><span class="add-info">Suggestion, iOS, Android</span>
</div>
<div class="bt-issue-counters likes-wrap"><span class="cd-issue-replies"><span class="value">11</span><svg class="icon"><use xlink:href="#icon-replies"/></svg></span><span class="cd-issue-like"><span class="value">427</span><svg class="icon"><use xlink:href="#icon-like"/></svg></span></div>
</div>
</div>
</a><a href="/c/755" data-layer class="bt-card-row" data-card-id="755">
<div class="bt-card-thumb thumb-feature thumb-icon strawberry thumb-color3"><span class="bt-card-thumb-status">Added</span></div>
<div class="bt-card-row-body">
<div class="bt-card-title">
Add Instant View to Telegram Desktop
</div>
<div class="bt-card-preview">Add Instant View to Telegram Desktop. The feature is there right now for MacOS Telegram App, but missing from regular Telegram Desktop. Preferably, it should open an article in the existing telegram window…</div>
<div class="bt-issue-footer-wrap">
<div class="bt-issue-footer">
<time datetime="2020-12-23T17:11:18+00:00" title="Dec 23, 2020 at 17:11" class="short">Dec 23, 2020</time><span class="bt-card-status"></span><span class="add-info">Suggestion, Telegram Desktop</span>
</div>
<div class="bt-issue-counters likes-wrap"><span class="cd-issue-replies"><span class="value">12</span><svg class="icon"><use xlink:href="#icon-replies"/></svg></span><span class="cd-issue-like"><span class="value">405</span><svg class="icon"><use xlink:href="#icon-like"/></svg></span></div>
</div>
</div>
</a><a href="/c/504" data-layer class="bt-card-row" data-card-id="504">
<div class="bt-card-thumb thumb-feature thumb-icon persimmon thumb-color0"><span class="bt-card-thumb-status">Added</span></div>
<div class="bt-card-row-body">
<div class="bt-card-title">
Requests to join group or channel
</div>
<div class="bt-card-preview">If enabled, the user attempting to join the group/channel will only be able to view the content and send things after being accepted by an administrator (optional: only admins who have the &quot;accept/decline…</div>
<div class="bt-issue-footer-wrap">
<div class="bt-issue-footer">
<time datetime="2020-11-23T20:47:52+00:00" title="Nov 23, 2020 at 20:47" class="short">Nov 23, 2020</time><span class="bt-card-status"></span><span class="add-info">Suggestion, General</span>
</div>
<div class="bt-issue-counters likes-wrap"><span class="cd-issue-replies"><span class="value">30</span><svg class="icon"><use xlink:href="#icon-replies"/></svg></span><span class="cd-issue-like"><span class="value">386</span><svg class="icon"><use xlink:href="#icon-like"/></svg></span></div>
</div>
</div>
</a><a href="/c/28" data-layer class="bt-card-row" data-card-id="28">
<div class="bt-card-thumb thumb-feature thumb-icon plum thumb-color4"><span class="bt-card-thumb-status">Added</span></div>
<div class="bt-card-row-body">
<div class="bt-card-title">
Separate passcode lock for specific chats or Archive
</div>
<div class="bt-card-preview">Option to lock certain chats with a separate passcode. On a chat-by-chat basis, or for an entire Chat Folder, e.g. the Archive. Use cases Family iPads and other shared devices. Can also be used in environments…</div>
<div class="bt-issue-footer-wrap">
<div class="bt-issue-footer">
<time datetime="2019-11-05T15:09:21+00:00" title="Nov 5, 2019 at 15:09" class="short">Nov 5, 2019</time><span class="bt-card-status"></span><span class="add-info">Suggestion</span>
</div>
<div class="bt-issue-counters likes-wrap"><span class="cd-issue-replies"><span class="value">10</span><svg class="icon"><use xlink:href="#icon-replies"/></svg></span><span class="cd-issue-like"><span class="value">353</span><svg class="icon"><use xlink:href="#icon-like"/></svg></span></div>
</div>
</div>
</a><a href="/c/729" data-layer class="bt-card-row" data-card-id="729">
<div class="bt-card-thumb thumb-feature thumb-icon gooseberry thumb-color1"><span class="bt-card-thumb-status">Added</span></div>
<div class="bt-card-row-body">
<div class="bt-card-title">
Call Transfers between Devices
</div>
<div class="bt-card-preview">An option to transfer ongoing calls from phone to a desktop PC and vice versa.</div>
<div class="bt-issue-footer-wrap">
<div class="bt-issue-footer">
<time datetime="2020-12-23T11:43:24+00:00" title="Dec 23, 2020 at 11:43" class="short">Dec 23, 2020</time><span class="bt-card-status"></span><span class="add-info">Suggestion, General, Calls</span>
</div>
<div class="bt-issue-counters likes-wrap"><span class="cd-issue-replies"><span class="value">6</span><svg class="icon"><use xlink:href="#icon-replies"/></svg></span><span class="cd-issue-like"><span class="value">343</span><svg class="icon"><use xlink:href="#icon-like"/></svg></span></div>
</div>
</div>
</a><a href="/c/31" data-layer class="bt-card-row" data-card-id="31">
<div class="bt-card-thumb thumb-feature thumb-icon rambutan thumb-color7"><span class="bt-card-thumb-status">Added</span></div>
<div class="bt-card-row-body">
<div class="bt-card-title">
More Two-Factor Authentication methods
</div>
<div class="bt-card-preview">An option to add an authenticator app with temporary, one-time passwords (e.g. Authy, Google Authenticator) as another second factor.</div>
<div class="bt-issue-footer-wrap">
<div class="bt-issue-footer">
<time datetime="2019-11-05T15:17:53+00:00" title="Nov 5, 2019 at 15:17" class="short">Nov 5, 2019</time><span class="bt-card-status"></span><span class="add-info">Suggestion</span>
</div>
<div class="bt-issue-counters likes-wrap"><span class="cd-issue-replies"><span class="value">7</span><svg class="icon"><use xlink:href="#icon-replies"/></svg></span><span class="cd-issue-like"><span class="value">341</span><svg class="icon"><use xlink:href="#icon-like"/></svg></span></div>
</div>
</div>
</a><a href="/c/21" data-layer class="bt-card-row" data-card-id="21">
<div class="bt-card-thumb thumb-feature thumb-icon papaya thumb-color5"><span class="bt-card-thumb-status">Added</span></div>
<div class="bt-card-row-body">
<div class="bt-card-title">
Different backgrounds for chats
</div>
<div class="bt-card-preview">A feature to set individual backgrounds for specific chats. Use cases This would make navigation between chats easier, especially for those who have lots of chats or just a visual type of person.</div>
<div class="bt-issue-footer-wrap">
<div class="bt-issue-footer">
<time datetime="2019-11-05T14:51:57+00:00" title="Nov 5, 2019 at 14:51" class="short">Nov 5, 2019</time><span class="bt-card-status"></span><span class="add-info">Suggestion</span>
</div>
<div class="bt-issue-counters likes-wrap"><span class="cd-issue-replies"><span class="value">23</span><svg class="icon"><use xlink:href="#icon-replies"/></svg></span><span class="cd-issue-like"><span class="value">319</span><svg class="icon"><use xlink:href="#icon-like"/></svg></span></div>
</div>
</div>
</a><a href="/c/65" data-layer class="bt-card-row" data-card-id="65">
<div class="bt-card-thumb thumb-feature thumb-icon physalis thumb-color1"><span class="bt-card-thumb-status">Added</span></div>
<div class="bt-card-row-body">
<div class="bt-card-title">
Disable &quot;New Contact Joined&quot; chats
</div>
<div class="bt-card-preview">Users receive a notification when one of their contacts becomes available on Telegram. It is currently possible to disable the notification: the new chats will appear in the list without sending a notification.…</div>
<div class="bt-issue-footer-wrap">
<div class="bt-issue-footer">
<time datetime="2019-12-11T11:23:35+00:00" title="Dec 11, 2019 at 11:23" class="short">Dec 11, 2019</time><span class="bt-card-status"></span><span class="add-info">Suggestion, General</span>
</div>
<div class="bt-issue-counters likes-wrap"><span class="cd-issue-replies"><span class="value">18</span><svg class="icon"><use xlink:href="#icon-replies"/></svg></span><span class="cd-issue-like"><span class="value">304</span><svg class="icon"><use xlink:href="#icon-like"/></svg></span></div>
</div>
</div>
</a><a href="/c/1964" data-layer class="bt-card-row" data-card-id="1964">
<div class="bt-card-thumb thumb-feature thumb-icon carambola thumb-color4"><span class="bt-card-thumb-status">Added</span></div>
<div class="bt-card-row-body">
<div class="bt-card-title">
Better global search
</div>
<div class="bt-card-preview">Make global search a place to find all communities in channels and public chats.</div>
<div class="bt-issue-footer-wrap">
<div class="bt-issue-footer">
<time datetime="2021-02-09T02:25:07+00:00" title="Feb 9 at 02:25" class="short">Feb 9</time><span class="bt-card-status"></span><span class="add-info">Suggestion, Android</span>
</div>
<div class="bt-issue-counters likes-wrap"><span class="cd-issue-replies"><span class="value">8</span><svg class="icon"><use xlink:href="#icon-replies"/></svg></span><span class="cd-issue-like"><span class="value">281</span><svg class="icon"><use xlink:href="#icon-like"/></svg></span></div>
</div>
</div>
</a><a href="/c/87" data-layer class="bt-card-row" data-card-id="87">
<div class="bt-card-thumb thumb-feature thumb-icon currant thumb-color7"><span class="bt-card-thumb-status">Added</span></div>
<div class="bt-card-row-body">
<div class="bt-card-title">
Starred Messages
</div>
<div class="bt-card-preview">An option to bookmark/star a message. Marking a message would add it to the separate Starred Messages section on the profile page, for quick access to messages. While Telegram doesn&#39;t have Starred Messages…</div>
<div class="bt-issue-footer-wrap">
<div class="bt-issue-footer">
<time datetime="2019-12-12T12:30:48+00:00" title="Dec 12, 2019 at 12:30" class="short">Dec 12, 2019</time><span class="bt-card-status"></span><span class="add-info">Suggestion</span>
</div>
<div class="bt-issue-counters likes-wrap"><span class="cd-issue-replies"><span class="value">62</span><svg class="icon"><use xlink:href="#icon-replies"/></svg></span><span class="cd-issue-like"><span class="value">258</span><svg class="icon"><use xlink:href="#icon-like"/></svg></span></div>
</div>
</div>
</a><a href="/c/385" data-layer class="bt-card-row" data-card-id="385">
<div class="bt-card-thumb thumb-feature thumb-icon physalis thumb-color1"><span class="bt-card-thumb-status">Added</span></div>
<div class="bt-card-row-body">
<div class="bt-card-title">
Show folders when forwarding a message
</div>
<div class="bt-card-preview">An option to see your folders when sharing or forwarding messages. Use case Find the chats you were looking for more quickly. Workarounds - Use the search option to find the chat if it&#39;s not at the top.…</div>
<div class="bt-issue-footer-wrap">
<div class="bt-issue-footer">
<time datetime="2020-11-17T02:05:56+00:00" title="Nov 17, 2020 at 02:05" class="short">Nov 17, 2020</time><span class="bt-card-status"></span><span class="add-info">Suggestion</span>
</div>
<div class="bt-issue-counters likes-wrap"><span class="cd-issue-replies"><span class="value">4</span><svg class="icon"><use xlink:href="#icon-replies"/></svg></span><span class="cd-issue-like"><span class="value">247</span><svg class="icon"><use xlink:href="#icon-like"/></svg></span></div>
</div>
</div>
</a><a href="/c/772" data-layer class="bt-card-row" data-card-id="772">
<div class="bt-card-thumb thumb-feature thumb-icon honeysuckle thumb-color4"><span class="bt-card-thumb-status">Added</span></div>
<div class="bt-card-row-body">
<div class="bt-card-title">
Transfer ownership if creator account was deleted
</div>
<div class="bt-card-preview">Option to transfer ownership in groups and channels if the creator was deleted so the first admin with all permissions will become a creator&#33; Thumbs up if you want this to happen <i class="emoji" style="background-image:url('//telegram.org/img/emoji/40/F09F918D.png')"><b>👍</b></i> App: all</div>
<div class="bt-issue-footer-wrap">
<div class="bt-issue-footer">
<time datetime="2020-12-24T04:47:10+00:00" title="Dec 24, 2020 at 04:47" class="short">Dec 24, 2020</time><span class="bt-card-status"></span><span class="add-info">Suggestion, General</span>
</div>
<div class="bt-issue-counters likes-wrap"><span class="cd-issue-replies"><span class="value">21</span><svg class="icon"><use xlink:href="#icon-replies"/></svg></span><span class="cd-issue-like"><span class="value">238</span><svg class="icon"><use xlink:href="#icon-like"/></svg></span></div>
</div>
</div>
</a><a href="/c/34" data-layer class="bt-card-row" data-card-id="34">
<div class="bt-card-thumb thumb-feature thumb-icon rose-hip thumb-color2"><span class="bt-card-thumb-status">Added</span></div>
<div class="bt-card-row-body">
<div class="bt-card-title">
Bookmarks in channels
</div>
<div class="bt-card-preview">A feature to mark a message in a channel, and to continue reading the channel from this message. Use cases Long stories, broadcasts, and &#39;I will read it later&#39; situations. Workaround Forwarding a message…</div>
<div class="bt-issue-footer-wrap">
<div class="bt-issue-footer">
<time datetime="2019-11-05T15:31:30+00:00" title="Nov 5, 2019 at 15:31" class="short">Nov 5, 2019</time><span class="bt-card-status"></span><span class="add-info">Suggestion</span>
</div>
<div class="bt-issue-counters likes-wrap"><span class="cd-issue-replies"><span class="value">14</span><svg class="icon"><use xlink:href="#icon-replies"/></svg></span><span class="cd-issue-like"><span class="value">233</span><svg class="icon"><use xlink:href="#icon-like"/></svg></span></div>
</div>
</div>
</a><a href="/c/27" data-layer class="bt-card-row" data-card-id="27">
<div class="bt-card-thumb thumb-feature thumb-icon pitaya thumb-color3"><span class="bt-card-thumb-status">Added</span></div>
<div class="bt-card-row-body">
<div class="bt-card-title">
Privacy settings for Bio
</div>
<div class="bt-card-preview">The Bio section in Telegram profiles is currently always public. Add an option to configure &#39;Who can see your bio?&#39; to the Privacy and Security Settings. Use cases Putting more sensitive or private info…</div>
<div class="bt-issue-footer-wrap">
<div class="bt-issue-footer">
<time datetime="2019-11-05T15:07:41+00:00" title="Nov 5, 2019 at 15:07" class="short">Nov 5, 2019</time><span class="bt-card-status"></span><span class="add-info">Suggestion</span>
</div>
<div class="bt-issue-counters likes-wrap"><span class="cd-issue-replies"><span class="value">8</span><svg class="icon"><use xlink:href="#icon-replies"/></svg></span><span class="cd-issue-like"><span class="value">230</span><svg class="icon"><use xlink:href="#icon-like"/></svg></span></div>
</div>
</div>
</a><a href="/c/69" data-layer class="bt-card-row" data-card-id="69">
<div class="bt-card-thumb thumb-feature thumb-icon pomegrenate thumb-color5"><span class="bt-card-thumb-status">Added</span></div>
<div class="bt-card-row-body">
<div class="bt-card-title">
Automatically use the best proxy in the list
</div>
<div class="bt-card-preview">An option to automatically check and connect to the best MTProxy if several proxies are available.</div>
<div class="bt-issue-footer-wrap">
<div class="bt-issue-footer">
<time datetime="2019-12-11T12:27:35+00:00" title="Dec 11, 2019 at 12:27" class="short">Dec 11, 2019</time><span class="bt-card-status"></span><span class="add-info">Suggestion</span>
</div>
<div class="bt-issue-counters likes-wrap"><span class="cd-issue-replies"><span class="value">5</span><svg class="icon"><use xlink:href="#icon-replies"/></svg></span><span class="cd-issue-like"><span class="value">220</span><svg class="icon"><use xlink:href="#icon-like"/></svg></span></div>
</div>
</div>
</a><a href="/c/742" data-layer class="bt-card-row" data-card-id="742">
<div class="bt-card-thumb thumb-feature thumb-icon peach thumb-color6"><span class="bt-card-thumb-status">Added</span></div>
<div class="bt-card-row-body">
<div class="bt-card-title">
Way to mark messages as sensitive
</div>
<div class="bt-card-preview">An option to mark a message or photo as sensitive before sending. Sensitive messages can be revealed or re-hidden with a tap and default to hidden when a chat is opened. App: all</div>
<div class="bt-issue-footer-wrap">
<div class="bt-issue-footer">
<time datetime="2020-12-23T14:31:55+00:00" title="Dec 23, 2020 at 14:31" class="short">Dec 23, 2020</time><span class="bt-card-status"></span><span class="add-info">Suggestion, General</span>
</div>
<div class="bt-issue-counters likes-wrap"><span class="cd-issue-replies"><span class="value">6</span><svg class="icon"><use xlink:href="#icon-replies"/></svg></span><span class="cd-issue-like"><span class="value">211</span><svg class="icon"><use xlink:href="#icon-like"/></svg></span></div>
</div>
</div>
</a><a href="/c/84" data-layer class="bt-card-row" data-card-id="84">
<div class="bt-card-thumb thumb-feature thumb-icon carambola thumb-color4"><span class="bt-card-thumb-status">Added</span></div>
<div class="bt-card-row-body">
<div class="bt-card-title">
Detailed &#39;Read&#39; status: time when read, who read messages in groups
</div>
<div class="bt-card-preview">A message info screen with more information about the &#39;read&#39; status of messages: When the message was read in private chats. Which group members read the message and at what time. Use cases Knowing…</div>
<div class="bt-issue-footer-wrap">
<div class="bt-issue-footer">
<time datetime="2019-12-12T12:15:21+00:00" title="Dec 12, 2019 at 12:15" class="short">Dec 12, 2019</time><span class="bt-card-status"></span><span class="add-info">Suggestion</span>
</div>
<div class="bt-issue-counters likes-wrap"><span class="cd-issue-replies"><span class="value">39</span><svg class="icon"><use xlink:href="#icon-replies"/></svg></span><span class="cd-issue-like"><span class="value">202</span><svg class="icon"><use xlink:href="#icon-like"/></svg></span></div>
</div>
</div>
</a><a href="/c/79" data-layer class="bt-card-row" data-card-id="79">
<div class="bt-card-thumb thumb-feature thumb-icon watermelon thumb-color7"><span class="bt-card-thumb-status">Added</span></div>
<div class="bt-card-row-body">
<div class="bt-card-title">
File manager
</div>
<div class="bt-card-preview">A feature for viewing, moving, selecting, and deleting all downloaded/cached items (files, media, etc.) in one place, perhaps under Storage Usage in the app&#39;s Settings. This can also be enhanced with…</div>
<div class="bt-issue-footer-wrap">
<div class="bt-issue-footer">
<time datetime="2019-12-12T06:20:59+00:00" title="Dec 12, 2019 at 06:20" class="short">Dec 12, 2019</time><span class="bt-card-status"></span><span class="add-info">Suggestion</span>
</div>
<div class="bt-issue-counters likes-wrap"><span class="cd-issue-replies"><span class="value">7</span><svg class="icon"><use xlink:href="#icon-replies"/></svg></span><span class="cd-issue-like"><span class="value">190</span><svg class="icon"><use xlink:href="#icon-like"/></svg></span></div>
</div>
</div>
</a><a href="/c/726" data-layer class="bt-card-row" data-card-id="726">
<div class="bt-card-thumb thumb-feature thumb-icon cloudberry thumb-color6"><span class="bt-card-thumb-status">Added</span></div>
<div class="bt-card-row-body">
<div class="bt-card-title">
Recording calls
</div>
<div class="bt-card-preview">Add ability to record calls in app App: all</div>
<div class="bt-issue-footer-wrap">
<div class="bt-issue-footer">
<time datetime="2020-12-23T09:45:51+00:00" title="Dec 23, 2020 at 09:45" class="short">Dec 23, 2020</time><span class="bt-card-status"></span><span class="add-info">Suggestion, General</span>
</div>
<div class="bt-issue-counters likes-wrap"><span class="cd-issue-replies"><span class="value">19</span><svg class="icon"><use xlink:href="#icon-replies"/></svg></span><span class="cd-issue-like"><span class="value">183</span><svg class="icon"><use xlink:href="#icon-like"/></svg></span></div>
</div>
</div>
</a><a href="/c/451" data-layer class="bt-card-row" data-card-id="451">
<div class="bt-card-thumb thumb-feature" style="background-image:url('https://telegra.ph/file/thumb/6f842151a16c53cf5fe9c.jpg')"><div class="bt-card-thumb-label">0:34</div><span class="bt-card-thumb-status">Added</span></div>
<div class="bt-card-row-body">
<div class="bt-card-title">
In-Call Messaging
</div>
<div class="bt-card-preview">Reply to incoming messages from your call partner without leaving another page currently open in the app. Demo 00:19 on the attached video.</div>
<div class="bt-issue-footer-wrap">
<div class="bt-issue-footer">
<time datetime="2020-11-19T15:50:35+00:00" title="Nov 19, 2020 at 15:50" class="short">Nov 19, 2020</time><span class="bt-card-status"></span><span class="add-info">Suggestion, Calls</span>
</div>
<div class="bt-issue-counters likes-wrap"><span class="cd-issue-replies"><span class="value">5</span><svg class="icon"><use xlink:href="#icon-replies"/></svg></span><span class="cd-issue-like"><span class="value">183</span><svg class="icon"><use xlink:href="#icon-like"/></svg></span></div>
</div>
</div>
</a><a href="/c/789" data-layer class="bt-card-row" data-card-id="789">
<div class="bt-card-thumb thumb-feature thumb-icon pomegrenate thumb-color5"><span class="bt-card-thumb-status">Added</span></div>
<div class="bt-card-row-body">
<div class="bt-card-title">
Change file names in Telegram
</div>
<div class="bt-card-preview">Option to change file name on Telegram without needing to re-upload the file. App: all</div>
<div class="bt-issue-footer-wrap">
<div class="bt-issue-footer">
<time datetime="2020-12-24T15:54:23+00:00" title="Dec 24, 2020 at 15:54" class="short">Dec 24, 2020</time><span class="bt-card-status"></span><span class="add-info">Suggestion, General</span>
</div>
<div class="bt-issue-counters likes-wrap"><span class="cd-issue-replies"><span class="value">14</span><svg class="icon"><use xlink:href="#icon-replies"/></svg></span><span class="cd-issue-like"><span class="value">171</span><svg class="icon"><use xlink:href="#icon-like"/></svg></span></div>
</div>
</div>
</a><a href="/c/739" data-layer class="bt-card-row" data-card-id="739">
<div class="bt-card-thumb thumb-feature thumb-icon mangosteen thumb-color3"><span class="bt-card-thumb-status">Added</span></div>
<div class="bt-card-row-body">
<div class="bt-card-title">
Statistics for Bots
</div>
<div class="bt-card-preview">An option to view Bot statistics in Bot Father, for example how many users started a conversation with the Bot&#33; App: all</div>
<div class="bt-issue-footer-wrap">
<div class="bt-issue-footer">
<time datetime="2020-12-23T13:53:45+00:00" title="Dec 23, 2020 at 13:53" class="short">Dec 23, 2020</time><span class="bt-card-status"></span><span class="add-info">Suggestion, Bot API</span>
</div>
<div class="bt-issue-counters likes-wrap"><span class="cd-issue-replies"><span class="value">9</span><svg class="icon"><use xlink:href="#icon-replies"/></svg></span><span class="cd-issue-like"><span class="value">170</span><svg class="icon"><use xlink:href="#icon-like"/></svg></span></div>
</div>
</div>
</a><a href="/c/1316" data-layer class="bt-card-row" data-card-id="1316">
<div class="bt-card-thumb thumb-feature" style="background-image:url('https://telegra.ph/file/thumb/9aadbf40ac038b66a2694-eb29c70b2b4aebcdf6.jpg')"><span class="bt-card-thumb-status">Added</span></div>
<div class="bt-card-row-body">
<div class="bt-card-title">
Allow to remove &quot;Your contacts on Telegram&quot; from the home page
</div>
<div class="bt-card-preview">The &quot;contacts on Telegram&quot; section is currently shown in the chat list when you have fewer than 10 chats. Workaround Have more than 10 chats in your list. </div>
<div class="bt-issue-footer-wrap">
<div class="bt-issue-footer">
<time datetime="2021-01-29T08:10:48+00:00" title="Jan 29 at 08:10" class="short">Jan 29</time><span class="bt-card-status"><span class="add-info">Closed</span></span><span class="add-info">Suggestion, Android</span>
</div>
<div class="bt-issue-counters likes-wrap"><span class="cd-issue-replies"><span class="value">51</span><svg class="icon"><use xlink:href="#icon-replies"/></svg></span><span class="cd-issue-like"><span class="value">167</span><svg class="icon"><use xlink:href="#icon-like"/></svg></span></div>
</div>
</div>
</a><a href="/c/824" data-layer class="bt-card-row" data-card-id="824">
<div class="bt-card-thumb thumb-feature" style="background-image:url('https://telegra.ph/file/thumb/edd42527ffa14fa26c0e0-5089339f9956665894.jpg')"><span class="bt-card-thumb-status">Added</span></div>
<div class="bt-card-row-body">
<div class="bt-card-title">
Syntax highlighting in code blocks
</div>
<div class="bt-card-preview">An optional extension to the backtick syntax to specify a language to highlight. Similar examples are the likes of Gitlab and GitHub comments.</div>
<div class="bt-issue-footer-wrap">
<div class="bt-issue-footer">
<time datetime="2020-12-27T09:29:16+00:00" title="Dec 27, 2020 at 09:29" class="short">Dec 27, 2020</time><span class="bt-card-status"></span><span class="add-info">Suggestion, General</span>
</div>
<div class="bt-issue-counters likes-wrap"><span class="cd-issue-replies"><span class="value">5</span><svg class="icon"><use xlink:href="#icon-replies"/></svg></span><span class="cd-issue-like"><span class="value">164</span><svg class="icon"><use xlink:href="#icon-like"/></svg></span></div>
</div>
</div>
</a><a href="/c/83" data-layer class="bt-card-row" data-card-id="83">
<div class="bt-card-thumb thumb-feature thumb-icon blueberry thumb-color3"><span class="bt-card-thumb-status">Added</span></div>
<div class="bt-card-row-body">
<div class="bt-card-title">
Stories / Statuses
</div>
<div class="bt-card-preview">An option to share moments (media, like photos or short videos, texts, etc.) with your mutual contacts (this can be adapted with granular privacy permissions) to view, interact, and forward. Such statuses…</div>
<div class="bt-issue-footer-wrap">
<div class="bt-issue-footer">
<time datetime="2019-12-12T12:09:13+00:00" title="Dec 12, 2019 at 12:09" class="short">Dec 12, 2019</time><span class="bt-card-status"></span><span class="add-info">Suggestion</span>
</div>
<div class="bt-issue-counters likes-wrap"><span class="cd-issue-replies"><span class="value">360</span><svg class="icon"><use xlink:href="#icon-replies"/></svg></span><span class="cd-issue-like"><span class="value">158</span><svg class="icon"><use xlink:href="#icon-like"/></svg></span></div>
</div>
</div>
</a><a href="/c/37" data-layer class="bt-card-row" data-card-id="37">
<div class="bt-card-thumb thumb-feature thumb-icon tamarind thumb-color5"><span class="bt-card-thumb-status">Added</span></div>
<div class="bt-card-row-body">
<div class="bt-card-title">
Hide messages from blocked users in groups
</div>
<div class="bt-card-preview">Sometimes you don&#39;t want to see messages from people you blocked, even in the groups you share with them. Such messages could be automatically collapsed and hidden under a spoiler (like &#39;You blocked Doge.…</div>
<div class="bt-issue-footer-wrap">
<div class="bt-issue-footer">
<time datetime="2019-11-05T15:36:24+00:00" title="Nov 5, 2019 at 15:36" class="short">Nov 5, 2019</time><span class="bt-card-status"></span><span class="add-info">Suggestion</span>
</div>
<div class="bt-issue-counters likes-wrap"><span class="cd-issue-replies"><span class="value">25</span><svg class="icon"><use xlink:href="#icon-replies"/></svg></span><span class="cd-issue-like"><span class="value">151</span><svg class="icon"><use xlink:href="#icon-like"/></svg></span></div>
</div>
</div>
</a><a href="/c/40" data-layer class="bt-card-row" data-card-id="40">
<div class="bt-card-thumb thumb-feature thumb-icon apple thumb-color0"><span class="bt-card-thumb-status">Added</span></div>
<div class="bt-card-row-body">
<div class="bt-card-title">
Group Voice Calls
</div>
<div class="bt-card-preview">Voice calls with three or more people. Related suggestion: Group Video Calls Workaround You can use Voice Chats in any of your groups to achieve similar goals. </div>
<div class="bt-issue-footer-wrap">
<div class="bt-issue-footer">
<time datetime="2019-11-06T10:55:49+00:00" title="Nov 6, 2019 at 10:55" class="short">Nov 6, 2019</time><span class="bt-card-status"></span><span class="add-info">Suggestion, Calls</span>
</div>
<div class="bt-issue-counters likes-wrap"><span class="cd-issue-replies"><span class="value">15</span><svg class="icon"><use xlink:href="#icon-replies"/></svg></span><span class="cd-issue-like"><span class="value">150</span><svg class="icon"><use xlink:href="#icon-like"/></svg></span></div>
</div>
</div>
</a><a href="/c/904" data-layer class="bt-card-row" data-card-id="904">
<div class="bt-card-thumb thumb-feature thumb-icon persimmon thumb-color0"><span class="bt-card-thumb-status">Added</span></div>
<div class="bt-card-row-body">
<div class="bt-card-title">
Secret Chats on Telegram Desktop
</div>
<div class="bt-card-preview">An option to create Secret Chats using the multiplatform Telegram Desktop client.</div>
<div class="bt-issue-footer-wrap">
<div class="bt-issue-footer">
<time datetime="2021-01-05T09:42:49+00:00" title="Jan 5 at 09:42" class="short">Jan 5</time><span class="bt-card-status"></span><span class="add-info">Suggestion, Telegram Desktop</span>
</div>
<div class="bt-issue-counters likes-wrap"><span class="cd-issue-replies"><span class="value">7</span><svg class="icon"><use xlink:href="#icon-replies"/></svg></span><span class="cd-issue-like"><span class="value">146</span><svg class="icon"><use xlink:href="#icon-like"/></svg></span></div>
</div>
</div>
</a><a href="/c/743" data-layer class="bt-card-row" data-card-id="743">
<div class="bt-card-thumb thumb-feature thumb-icon pear thumb-color7"><span class="bt-card-thumb-status">Added</span></div>
<div class="bt-card-row-body">
<div class="bt-card-title">
Feed or Stream with posts from Subscribed Channels
</div>
<div class="bt-card-preview">Show posts from channels you&#39;re subsribed to in a single view, one post after another without the need to open each channel seprately to see what&#39;s new. Like Twitter and other feed-based social networks.…</div>
<div class="bt-issue-footer-wrap">
<div class="bt-issue-footer">
<time datetime="2020-12-23T14:43:00+00:00" title="Dec 23, 2020 at 14:43" class="short">Dec 23, 2020</time><span class="bt-card-status"></span><span class="add-info">Suggestion, General</span>
</div>
<div class="bt-issue-counters likes-wrap"><span class="cd-issue-replies"><span class="value">39</span><svg class="icon"><use xlink:href="#icon-replies"/></svg></span><span class="cd-issue-like"><span class="value">145</span><svg class="icon"><use xlink:href="#icon-like"/></svg></span></div>
</div>
</div>
</a><a href="/c/1050" data-layer class="bt-card-row" data-card-id="1050">
<div class="bt-card-thumb thumb-feature" style="background-image:url('https://telegra.ph/file/thumb/20212d5f1082687d28079-b578971215660401f7.jpg')"><span class="bt-card-thumb-status">Added</span></div>
<div class="bt-card-row-body">
<div class="bt-card-title">
Partial reply
</div>
<div class="bt-card-preview">Reply only on parts of a message. This would be very useful, if someone wrote a very long message and you only want to refer to one or two sentences - or even only one or a few words.  If you click on…</div>
<div class="bt-issue-footer-wrap">
<div class="bt-issue-footer">
<time datetime="2021-01-23T21:44:26+00:00" title="Jan 23 at 21:44" class="short">Jan 23</time><span class="bt-card-status"></span><span class="add-info">Suggestion, General</span>
</div>
<div class="bt-issue-counters likes-wrap"><span class="cd-issue-replies"><span class="value">9</span><svg class="icon"><use xlink:href="#icon-replies"/></svg></span><span class="cd-issue-like"><span class="value">140</span><svg class="icon"><use xlink:href="#icon-like"/></svg></span></div>
</div>
</div>
</a><a href="/c/858" data-layer class="bt-card-row" data-card-id="858">
<div class="bt-card-thumb thumb-feature thumb-icon mango thumb-color2"><span class="bt-card-thumb-status">Added</span></div>
<div class="bt-card-row-body">
<div class="bt-card-title">
Sign up for Telegram without a phone number
</div>
<div class="bt-card-preview">You currently need a phone number to sign up for Telegram. Add an option to sign up using an email address or another method, like some messengers do (e.g., Wire, Matrix, Threema, Session). Potential…</div>
<div class="bt-issue-footer-wrap">
<div class="bt-issue-footer">
<time datetime="2020-12-30T08:46:05+00:00" title="Dec 30, 2020 at 08:46" class="short">Dec 30, 2020</time><span class="bt-card-status"></span><span class="add-info">Suggestion, General</span>
</div>
<div class="bt-issue-counters likes-wrap"><span class="cd-issue-replies"><span class="value">60</span><svg class="icon"><use xlink:href="#icon-replies"/></svg></span><span class="cd-issue-like"><span class="value">131</span><svg class="icon"><use xlink:href="#icon-like"/></svg></span></div>
</div>
</div>
</a><a href="/c/1066" data-layer class="bt-card-row" data-card-id="1066">
<div class="bt-card-thumb thumb-feature" style="background-image:url('https://telegra.ph/file/thumb/42a571d0d1c575711cb36-3d864e40c21005a825.jpg')"><span class="bt-card-thumb-status">Added</span></div>
<div class="bt-card-row-body">
<div class="bt-card-title">
Tmail - Telegram Email Service
</div>
<div class="bt-card-preview">Telegram is a great messenger, but it can also be a great Email service. So without further introductions, let&#39;s start. Mail app can be separated or it can simply be integrated inside the Telegram messenger…</div>
<div class="bt-issue-footer-wrap">
<div class="bt-issue-footer">
<time datetime="2021-01-24T12:37:49+00:00" title="Jan 24 at 12:37" class="short">Jan 24</time><span class="bt-card-status"></span><span class="add-info">Suggestion, General</span>
</div>
<div class="bt-issue-counters likes-wrap"><span class="cd-issue-replies"><span class="value">17</span><svg class="icon"><use xlink:href="#icon-replies"/></svg></span><span class="cd-issue-like"><span class="value">124</span><svg class="icon"><use xlink:href="#icon-like"/></svg></span></div>
</div>
</div>
</a><div class="bt-load-more-wrap js-load-more" data-offset="50"><a class="bt-load-more" data-loading="Loading"></a></div>
</section></main>
</div><div class="popup-container login-popup-container hide" id="login-popup-container">
<div class="popup">
<div class="popup-body">
<section>
<h2>Log In</h2>
<p>Log in here to report bugs or suggest features. Please enter your <b>phone number</b> in the <a target="_blank" rel="noopener" href="https://telegram.org/faq#login-and-sms">international format</a> and we will send a confirmation message to your account via Telegram.</p>
<form id="send-form" class="login-form">
<div class="form-group">
<input type="tel" class="form-control cd-form-control input-lg" id="phone-number" placeholder="+12223334455" autocomplete="off"/>
</div>
<div class="popup-buttons">
<a class="btn btn-link btn-lg login-cancel-btn">Cancel</a><button type="submit" class="btn btn-link btn-lg">Next</button>
</div>
</form>
<div id="login-form" class="hide">
<div class="form-group">
<span class="form-control cd-form-control input input-lg input-disabled"><strong id="phone-number-field"></strong> (<a class="login-back" href="/auth">Incorrect?</a>)</span>
<p class="help-block dots-animated">We&#39;ve just sent you a message.<br/>Please confirm access via Telegram</p>
</div>
<div class="popup-buttons">
<a class="btn btn-link btn-lg login-cancel-btn">Cancel</a><a class="btn btn-link btn-lg login-back">Back</a>
</div>
</div>
</section>
</div>
</div>
</div></div>
<script src="/js/jquery.min.js?1"></script>
<script src="/js/bootstrap.min.js"></script>
<script src="/js/main-aj.js?48"></script>
<script src="/js/bugtracker.js?66"></script>
<script src="/js/jquery-ui.min.js?1"></script>
<script src="/js/codemirror/codemirror.js?1"></script>
<script src="/js/codemirror/overlay.js?1"></script>
<script src="/js/codemirror/markdown.js?1"></script>
<script src="/js/codemirror/gfm.js?1"></script>
<script>ajInit({"version":417,"apiUrl":"\/api?hash=4e93e14d16f2927730","unauth":true,"state":{"queryValues":[{"prefix":"s:","val":0,"name":"Open","field":"status","group":"s","class":"c-cyan"},{"prefix":"s:","val":2,"name":"Closed","field":"status","group":"s","class":"c-orange"},{"prefix":"s:","val":1,"name":"Fix coming","field":"status","group":"s","class":"c-lightgreen"},{"prefix":"s:","val":3,"name":"Fixed","field":"status","group":"s","class":"c-green"},{"prefix":"t:","val":26,"name":"General","field":"tag_ids"},{"prefix":"t:","val":2,"name":"Android","field":"tag_ids"},{"prefix":"t:","val":1,"name":"iOS","field":"tag_ids"},{"prefix":"t:","val":4,"name":"Telegram Desktop","field":"tag_ids"},{"prefix":"t:","val":3,"name":"macOS","field":"tag_ids"},{"prefix":"t:","val":22,"name":"Web","field":"tag_ids"},{"prefix":"t:","val":19,"name":"Android X","field":"tag_ids"},{"prefix":"t:","val":25,"name":"Bot API","field":"tag_ids"},{"prefix":"t:","val":29,"name":"Accessibility","field":"tag_ids"},{"prefix":"t:","val":31,"name":"Calls","field":"tag_ids"},{"prefix":"t:","val":30,"name":"Tablet","field":"tag_ids"},{"prefix":"t:","val":13,"name":"Tip","field":"tag_ids"},{"prefix":"t:","val":40,"name":"WebK","field":"tag_ids"},{"prefix":"t:","val":41,"name":"WebZ","field":"tag_ids"}],"emptyValues":[],"searchMethod":"searchIssues","headerLangKey":"WEB_N_CARDS_HEADER","headerNullLangKey":"WEB_CARDS_HEADER"}});</script>
<script id="aj_script">l.add({"WEB_NO_TAGS_FOUND":"No tags found","WEB_N_CARDS_HEADER":"{{n:# Card|# Cards}}","WEB_CARDS_HEADER":"Cards"});
Filters.init();
Bugtracker.init();
Aj.onLoad(function(state) {
function requestConfirmation(event) {
event && event.preventDefault();
var phone = $('#phone-number').val();
$.ajax({
type: 'POST',
url: '/auth/request',
data: {
phone: phone
},
success: function(result) {
$('#phone-number-field').text(phone);
$('#send-form').addClass('hide');
$('#login-form').removeClass('hide');
checkAuth(result.temp_session);
},
error: function(xhr) {
showAlert(xhr.responseText || 'Server error');
},
dataType: 'json'
});
return false;
}
function cancelConfirmation(event) {
event && event.preventDefault();
$('#phone-number-field').text('');
$('#send-form').removeClass('hide');
$('#login-form').addClass('hide');
$('#phone-number').focus();
clearTimeout(window.authTimeout);
return false;
}
function checkAuth(temp_session) {
clearTimeout(window.authTimeout);
window.authTimeout = setTimeout(function doCheckAuth() {
$.ajax({
type: 'POST',
url: '/auth/login',
data: {
temp_session: temp_session
},
success: function(result) {
if (result) {
location.reload();
} else {
checkAuth(temp_session);
}
},
error: function (xhr) {
showAlert(xhr.responseText || 'Server error');
},
dataType: 'json'
});
}, 700);
}
$('#login-popup-container').on('popup:open', function() {
$('#phone-number').focus();
});
$('#login-popup-container').on('popup:close', function() {
cancelConfirmation();
if (location.pathname == '/auth') {
window.history && history.replaceState(null, null, '/');
}
});
$('#login-popup-container #send-form').on('submit', requestConfirmation);
$('#login-popup-container .login-cancel-btn').on('click', function(e) {
e.preventDefault();
closePopup('#login-popup-container');
});
$('#login-popup-container .login-back').on('click', cancelConfirmation);
$('header .login-link').on('click', function(e) {
e.stopImmediatePropagation();
e.preventDefault();
openPopup('#login-popup-container');
});
});
Aj.onUnload(function(state) {
$('#login-popup-container').off('popup:open');
$('#login-popup-container').off('popup:close');
$('#login-popup-container #send-form').off('submit');
$('#login-popup-container .login-cancel-btn').off('click');
$('#login-popup-container .login-back').off('click');
$('header .login-link').off('click');
});
</script>
<script>Aj.pageLoaded();</script>
</body>
</html>
<!-- page generated in 68.34ms -->

View file

@ -0,0 +1,174 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Bugs and Suggestions</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<meta name="format-detection" content="telephone=no" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="MobileOptimized" content="176" />
<meta name="HandheldFriendly" content="True" />
<link rel="shortcut icon" href="/img/bt_favicon.ico" type="image/x-icon" />
<link rel="mask-icon" href="/img/bt_icon.svg" color="#238fe1">
<script>document.cookie="stel_dt="+encodeURIComponent((new Date).getTimezoneOffset())+";path=/;max-age=31536000;samesite=None;secure"</script>
<link href="https://fonts.googleapis.com/css?family=Roboto:400,500,700" rel="stylesheet" type="text/css">
<link href="/css/bootstrap.min.css?3" rel="stylesheet">
<link href="/css/bootstrap-extra.css?2" rel="stylesheet">
<link href="/css/telegram.css?212" rel="stylesheet">
<link href="/css/bugtracker.css?68" rel="stylesheet">
<link href="/css/bugtracker-bugs.css?4" rel="stylesheet">
<link href="/css/contest-zoo.css?7" rel="stylesheet">
<link href="/css/jquery-ui.min.css" rel="stylesheet">
<link href="/css/codemirror.css?1" rel="stylesheet">
</head>
<body class="emoji_image no-transition">
<svg xmlns="http://www.w3.org/2000/svg" style="display:none">
<defs>
<path id="icon-like" d="m16 14h-1.6c-.44 0-.8-.35-.8-.78v-7c0-.43.36-.78.8-.78h1.6zm-15.86-5.54c-.09-.19-.14-.4-.14-.62v-.84c0-.86.72-1.56 1.6-1.56h4.4l-.74-3.61c-.04-.17-.01-.36.07-.52.18-.35.41-.66.7-.94l.37-.37 5.13 4.99c.3.29.47.69.47 1.1v6.09c0 1-.84 1.82-1.87 1.82h-6.48c-.57 0-1.09-.29-1.38-.75z"/>
<path id="icon-dislike" d="m16 0h-1.6c-.4 0-.8.3-.8.8v7c0 .4.4.8.8.8h1.6zm-15.9 5.5c-.1.2-.1.4-.1.7v.8c0 .9.7 1.6 1.6 1.6h4.4l-.7 3.6c-.1.1-.1.3 0 .5.2.3.4.7.7.9l.4.4 5.1-5c.3-.3.5-.7.5-1.1v-6.1c0-1-.8-1.8-1.9-1.8h-6.5c-.5 0-1 .3-1.3.8z"/>
<path id="icon-replies" d="m5.951.078-.072.061-5.73 5.911c-.192.198-.214.5-.066.723l.063.079 5.731 6.007c.088.091.209.143.336.143.228 0 .417-.164.457-.38l.006-.072v-3.374c.106-.006.211-.01.318-.013l.319-.004c2.919 0 5.42.819 7.179 2.457.121-.075.284-.109.463-.124l.045.263c-.511-3.167-1.332-4.236-2.573-5.476-1.348-1.345-3.132-2.19-5.353-2.536l-.397-.056v-3.225c0-.126-.051-.246-.141-.333-.161-.157-.406-.173-.585-.051z"/>
<path id="icon-subscribe" d="m9.47 14c.07.16.12.32.12.5c0 .83-.9 1.5-2 1.5c-1.11 0-2-.67-2-1.5c0-.18.04-.34.11-.5zm-1.88-14c.55 0 1 .45 1 1v.1c2.28.46 4 2.48 4 4.9v4l1.29 1.29c.39.39.39 1.03 0 1.42c-.19.18-.44.29-.71.29h-11.17c-.55 0-1-.45-1-1c0-.27.11-.52.29-.71l1.3-1.29v-4c0-2.42 1.71-4.44 4-4.9v-.1c0-.55.44-1 1-1z"/>
<path id="icon-trending" d="m7.5 11.96-3.62 2.14c-.4.24-.92.1-1.15-.3-.11-.18-.15-.4-.1-.61l.91-4.1-3.15-2.79c-.35-.31-.38-.84-.07-1.19.14-.16.33-.26.54-.28l4.19-.4 1.68-3.86c.18-.42.68-.62 1.1-.43.2.08.36.24.44.43l1.68 3.86 4.19.4c.46.05.8.46.75.92-.02.21-.12.41-.28.55l-3.15 2.79.91 4.1c.1.46-.18.91-.64 1.01-.2.04-.42.01-.61-.1z"></path>
<path id="icon-copy" d="m17.8 13.3c.7 0 1.2.5 1.2 1.2v1c0 3.6-2.9 6.5-6.5 6.5s-6.5-2.9-6.5-6.5v-1c0-.7.5-1.2 1.2-1.2s1.2.5 1.2 1.2v1c0 2.3 1.8 4.1 4.1 4.1s4.1-1.8 4.1-4.1v-1c0-.7.5-1.2 1.2-1.2zm-5.3-5.3c.7 0 1.3.6 1.3 1.3v5.4c0 .7-.6 1.3-1.3 1.3s-1.3-.6-1.3-1.3v-5.4c0-.7.6-1.3 1.3-1.3zm0-6c3.6 0 6.5 2.9 6.5 6.5v1c0 .7-.5 1.2-1.2 1.2s-1.2-.5-1.2-1.2v-1c0-2.3-1.8-4.1-4.1-4.1s-4.1 1.8-4.1 4.1v1c0 .7-.5 1.2-1.2 1.2s-1.2-.5-1.2-1.2v-1c0-3.6 2.9-6.5 6.5-6.5z" transform="matrix(.70710678 .70710678 -.70710678 .70710678 9.146447 -8.324116)"/>
<g id="icon-arrow" fill-rule="evenodd"><rect height="2" rx="1" width="13" x="5" y="11"/><rect height="2.2" rx="1.1" transform="rotate(135 18 12.1)" width="10" x="16.9" y="11"/><rect height="2.2" rx="1.1" transform="rotate(-135, 18, 11.9)" width="10" x="16.9" y="10.8"/></g>
<g id="icon-close" fill-rule="evenodd"><rect id="icon-part1" height="16" rx="1.05" transform="rotate(-45 12 12)" width="2.1" x="10.95" y="3.95"/><use transform="rotate(90 12 12)" xlink:href="#icon-part1"/></g>
<g id="icon-layer-close" fill-rule="evenodd"><rect id="icon-part2" height="19" rx="1.25" transform="rotate(-45 12 12)" width="2.5" x="10.75" y="2.25"/><use transform="rotate(90 12 12)" xlink:href="#icon-part2"/></g>
<g id="icon-dd" fill-rule="evenodd"><path d="m.78.69c-.38.33-.42.91-.08 1.29.02.03.05.06.08.08l4.81 4.25c.44.4 1.11.4 1.55 0 .38-.33.42-.91.08-1.29-.02-.03-.05-.06-.08-.08l-4.81-4.25c-.44-.4-1.11-.4-1.55 0z"/><path d="m12.14.69c.38.33.42.91.08 1.29-.02.03-.05.06-.08.08l-4.81 4.25c-.44.4-1.11.4-1.55 0-.38-.33-.42-.91-.08-1.29.02-.03.05-.06.08-.08l4.81-4.25c.44-.4 1.11-.4 1.55 0z"/></g>
</defs>
</svg>
<div id="aj_progress" class="progress-bar"></div>
<div id="aj_content"><div class="popup-container login-popup-container hide" id="login-popup-container">
<div class="popup">
<div class="popup-body">
<section>
<h2>Log In</h2>
<p>Log in here to report bugs or suggest features. Please enter your <b>phone number</b> in the <a target="_blank" rel="noopener" href="https://telegram.org/faq#login-and-sms">international format</a> and we will send a confirmation message to your account via Telegram.</p>
<form id="send-form" class="login-form">
<div class="form-group">
<input type="tel" class="form-control cd-form-control input-lg" id="phone-number" placeholder="+12223334455" autocomplete="off"/>
</div>
<div class="popup-buttons">
<a class="btn btn-link btn-lg login-cancel-btn">Cancel</a><button type="submit" class="btn btn-link btn-lg">Next</button>
</div>
</form>
<div id="login-form" class="hide">
<div class="form-group">
<span class="form-control cd-form-control input input-lg input-disabled"><strong id="phone-number-field"></strong> (<a class="login-back" href="/auth">Incorrect?</a>)</span>
<p class="help-block dots-animated">We&#39;ve just sent you a message.<br/>Please confirm access via Telegram</p>
</div>
<div class="popup-buttons">
<a class="btn btn-link btn-lg login-cancel-btn">Cancel</a><a class="btn btn-link btn-lg login-back">Back</a>
</div>
</div>
</section>
</div>
</div>
</div></div>
<script src="/js/jquery.min.js?1"></script>
<script src="/js/bootstrap.min.js"></script>
<script src="/js/main-aj.js?48"></script>
<script src="/js/bugtracker.js?66"></script>
<script src="/js/jquery-ui.min.js?1"></script>
<script src="/js/codemirror/codemirror.js?1"></script>
<script src="/js/codemirror/overlay.js?1"></script>
<script src="/js/codemirror/markdown.js?1"></script>
<script src="/js/codemirror/gfm.js?1"></script>
<script>ajInit({"version":417,"apiUrl":"\/api?hash=4e5ac5057a478f9d5b","unauth":true});</script>
<script id="aj_script">openPopup('#login-popup-container');$('#login-popup-container').one('popup:close',function(){Aj.location('/')});
Bugtracker.init();
Aj.onLoad(function(state) {
function requestConfirmation(event) {
event && event.preventDefault();
var phone = $('#phone-number').val();
$.ajax({
type: 'POST',
url: '/auth/request',
data: {
phone: phone
},
success: function(result) {
$('#phone-number-field').text(phone);
$('#send-form').addClass('hide');
$('#login-form').removeClass('hide');
checkAuth(result.temp_session);
},
error: function(xhr) {
showAlert(xhr.responseText || 'Server error');
},
dataType: 'json'
});
return false;
}
function cancelConfirmation(event) {
event && event.preventDefault();
$('#phone-number-field').text('');
$('#send-form').removeClass('hide');
$('#login-form').addClass('hide');
$('#phone-number').focus();
clearTimeout(window.authTimeout);
return false;
}
function checkAuth(temp_session) {
clearTimeout(window.authTimeout);
window.authTimeout = setTimeout(function doCheckAuth() {
$.ajax({
type: 'POST',
url: '/auth/login',
data: {
temp_session: temp_session
},
success: function(result) {
if (result) {
location.reload();
} else {
checkAuth(temp_session);
}
},
error: function (xhr) {
showAlert(xhr.responseText || 'Server error');
},
dataType: 'json'
});
}, 700);
}
$('#login-popup-container').on('popup:open', function() {
$('#phone-number').focus();
});
$('#login-popup-container').on('popup:close', function() {
cancelConfirmation();
if (location.pathname == '/auth') {
window.history && history.replaceState(null, null, '/');
}
});
$('#login-popup-container #send-form').on('submit', requestConfirmation);
$('#login-popup-container .login-cancel-btn').on('click', function(e) {
e.preventDefault();
closePopup('#login-popup-container');
});
$('#login-popup-container .login-back').on('click', cancelConfirmation);
$('header .login-link').on('click', function(e) {
e.stopImmediatePropagation();
e.preventDefault();
openPopup('#login-popup-container');
});
});
Aj.onUnload(function(state) {
$('#login-popup-container').off('popup:open');
$('#login-popup-container').off('popup:close');
$('#login-popup-container #send-form').off('submit');
$('#login-popup-container .login-cancel-btn').off('click');
$('#login-popup-container .login-back').off('click');
$('header .login-link').off('click');
});
</script>
<script>Aj.pageLoaded();</script>
</body>
</html>
<!-- page generated in 47.08ms -->

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,960 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Bugs and Suggestions</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<meta name="format-detection" content="telephone=no" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="MobileOptimized" content="176" />
<meta name="HandheldFriendly" content="True" /><meta property="og:title" content="Emergency passcode to hide chats">
<meta property="og:description" content="Option to set a second passcode that either opens a limited set of chats, opens a different account, or destroys one of the connected accounts completely when entered (&quot;double bottom&quot;).
Use cases
Could be used by political activists in opressive countries…">
<link rel="shortcut icon" href="/img/bt_favicon.ico" type="image/x-icon" />
<link rel="mask-icon" href="/img/bt_icon.svg" color="#238fe1">
<script>document.cookie="stel_dt="+encodeURIComponent((new Date).getTimezoneOffset())+";path=/;max-age=31536000;samesite=None;secure"</script>
<script>
try {
var a = document.createElement('a'), layer_url;
a.href = location.href;
layer_url = location.pathname.replace(/^\/+|\/+$/g, '');
a.pathname = '/';
a.search = '?l=' + encodeURIComponent(layer_url);
if (window.history && history.state && history.state.u && /[\?&]l=/.test(history.state.u) && history.state.u != a.href) {
var xhr = new XMLHttpRequest();
xhr.open('GET', history.state.u);
xhr.onreadystatechange = function() {
if (xhr.readyState == 4) {
if (typeof xhr.responseBody == 'undefined' && xhr.responseText) {
var html = xhr.responseText;
html = html.replace('<html', '<html style="display:none"');
document.write(html);
document.close();
}
}
};
xhr.withCredentials = true;
xhr.send();
document.write('<style>*{display:none!important}</style>');
document.close();
document.open();
console.log('xhr reload from history.state');
} }catch(e){}
</script>
<link href="https://fonts.googleapis.com/css?family=Roboto:400,500,700" rel="stylesheet" type="text/css">
<link href="/css/bootstrap.min.css?3" rel="stylesheet">
<link href="/css/bootstrap-extra.css?2" rel="stylesheet">
<link href="/css/telegram.css?212" rel="stylesheet">
<link href="/css/bugtracker.css?68" rel="stylesheet">
<link href="/css/bugtracker-bugs.css?4" rel="stylesheet">
<link href="/css/contest-zoo.css?7" rel="stylesheet">
<link href="/css/jquery-ui.min.css" rel="stylesheet">
<link href="/css/codemirror.css?1" rel="stylesheet">
</head>
<body class="emoji_image no-transition">
<svg xmlns="http://www.w3.org/2000/svg" style="display:none">
<defs>
<path id="icon-like" d="m16 14h-1.6c-.44 0-.8-.35-.8-.78v-7c0-.43.36-.78.8-.78h1.6zm-15.86-5.54c-.09-.19-.14-.4-.14-.62v-.84c0-.86.72-1.56 1.6-1.56h4.4l-.74-3.61c-.04-.17-.01-.36.07-.52.18-.35.41-.66.7-.94l.37-.37 5.13 4.99c.3.29.47.69.47 1.1v6.09c0 1-.84 1.82-1.87 1.82h-6.48c-.57 0-1.09-.29-1.38-.75z"/>
<path id="icon-dislike" d="m16 0h-1.6c-.4 0-.8.3-.8.8v7c0 .4.4.8.8.8h1.6zm-15.9 5.5c-.1.2-.1.4-.1.7v.8c0 .9.7 1.6 1.6 1.6h4.4l-.7 3.6c-.1.1-.1.3 0 .5.2.3.4.7.7.9l.4.4 5.1-5c.3-.3.5-.7.5-1.1v-6.1c0-1-.8-1.8-1.9-1.8h-6.5c-.5 0-1 .3-1.3.8z"/>
<path id="icon-replies" d="m5.951.078-.072.061-5.73 5.911c-.192.198-.214.5-.066.723l.063.079 5.731 6.007c.088.091.209.143.336.143.228 0 .417-.164.457-.38l.006-.072v-3.374c.106-.006.211-.01.318-.013l.319-.004c2.919 0 5.42.819 7.179 2.457.121-.075.284-.109.463-.124l.045.263c-.511-3.167-1.332-4.236-2.573-5.476-1.348-1.345-3.132-2.19-5.353-2.536l-.397-.056v-3.225c0-.126-.051-.246-.141-.333-.161-.157-.406-.173-.585-.051z"/>
<path id="icon-subscribe" d="m9.47 14c.07.16.12.32.12.5c0 .83-.9 1.5-2 1.5c-1.11 0-2-.67-2-1.5c0-.18.04-.34.11-.5zm-1.88-14c.55 0 1 .45 1 1v.1c2.28.46 4 2.48 4 4.9v4l1.29 1.29c.39.39.39 1.03 0 1.42c-.19.18-.44.29-.71.29h-11.17c-.55 0-1-.45-1-1c0-.27.11-.52.29-.71l1.3-1.29v-4c0-2.42 1.71-4.44 4-4.9v-.1c0-.55.44-1 1-1z"/>
<path id="icon-trending" d="m7.5 11.96-3.62 2.14c-.4.24-.92.1-1.15-.3-.11-.18-.15-.4-.1-.61l.91-4.1-3.15-2.79c-.35-.31-.38-.84-.07-1.19.14-.16.33-.26.54-.28l4.19-.4 1.68-3.86c.18-.42.68-.62 1.1-.43.2.08.36.24.44.43l1.68 3.86 4.19.4c.46.05.8.46.75.92-.02.21-.12.41-.28.55l-3.15 2.79.91 4.1c.1.46-.18.91-.64 1.01-.2.04-.42.01-.61-.1z"></path>
<path id="icon-copy" d="m17.8 13.3c.7 0 1.2.5 1.2 1.2v1c0 3.6-2.9 6.5-6.5 6.5s-6.5-2.9-6.5-6.5v-1c0-.7.5-1.2 1.2-1.2s1.2.5 1.2 1.2v1c0 2.3 1.8 4.1 4.1 4.1s4.1-1.8 4.1-4.1v-1c0-.7.5-1.2 1.2-1.2zm-5.3-5.3c.7 0 1.3.6 1.3 1.3v5.4c0 .7-.6 1.3-1.3 1.3s-1.3-.6-1.3-1.3v-5.4c0-.7.6-1.3 1.3-1.3zm0-6c3.6 0 6.5 2.9 6.5 6.5v1c0 .7-.5 1.2-1.2 1.2s-1.2-.5-1.2-1.2v-1c0-2.3-1.8-4.1-4.1-4.1s-4.1 1.8-4.1 4.1v1c0 .7-.5 1.2-1.2 1.2s-1.2-.5-1.2-1.2v-1c0-3.6 2.9-6.5 6.5-6.5z" transform="matrix(.70710678 .70710678 -.70710678 .70710678 9.146447 -8.324116)"/>
<g id="icon-arrow" fill-rule="evenodd"><rect height="2" rx="1" width="13" x="5" y="11"/><rect height="2.2" rx="1.1" transform="rotate(135 18 12.1)" width="10" x="16.9" y="11"/><rect height="2.2" rx="1.1" transform="rotate(-135, 18, 11.9)" width="10" x="16.9" y="10.8"/></g>
<g id="icon-close" fill-rule="evenodd"><rect id="icon-part1" height="16" rx="1.05" transform="rotate(-45 12 12)" width="2.1" x="10.95" y="3.95"/><use transform="rotate(90 12 12)" xlink:href="#icon-part1"/></g>
<g id="icon-layer-close" fill-rule="evenodd"><rect id="icon-part2" height="19" rx="1.25" transform="rotate(-45 12 12)" width="2.5" x="10.75" y="2.25"/><use transform="rotate(90 12 12)" xlink:href="#icon-part2"/></g>
<g id="icon-dd" fill-rule="evenodd"><path d="m.78.69c-.38.33-.42.91-.08 1.29.02.03.05.06.08.08l4.81 4.25c.44.4 1.11.4 1.55 0 .38-.33.42-.91.08-1.29-.02-.03-.05-.06-.08-.08l-4.81-4.25c-.44-.4-1.11-.4-1.55 0z"/><path d="m12.14.69c.38.33.42.91.08 1.29-.02.03-.05.06-.08.08l-4.81 4.25c-.44.4-1.11.4-1.55 0-.38-.33-.42-.91-.08-1.29.02-.03.05-.06.08-.08l4.81-4.25c.44-.4 1.11-.4 1.55 0z"/></g>
</defs>
</svg>
<div id="aj_progress" class="progress-bar"></div>
<div class="popup-container hide" id="layer-popup-container"><section class="bt-layer-content popup-no-close">
<div class="bt-layer-side-buttons">
<a href="/" data-layer-close class="bt-layer-side-button bt-layer-close"><svg class="icon"><use xlink:href="#icon-layer-close"/></svg></a>
</div>
<div class="bt-layer-content-empty">Sorry, this card doesn&#39;t exist.</div>
</section></div>
<div id="aj_content"><div class="bt-container">
<header>
<div class="container">
<div class="header-wrap">
<div id="header-panel" class="header-panel">
<div class="header-auth">
<div class="header-auth-item"><a class="header-auth-link login-link" href="/auth">Login</a></div>
</div>
<div class="header-breadcrumb header-breadcrumb-simple">
<ol id="breadcrumb" class="header-nav breadcrumb"><li class="cd-logo"><a href="/"><i class="cd-icon"></i><span class="cd-logo-title">Bugs and Suggestions</span></a></li></ol>
</div>
</div>
</div>
</div>
</header><header class="bt-search-header sticky">
<div class="sticky-box">
<div class="container">
<section class="bt-search">
<form action="/" class="cd-form bt-main-search-form">
<input type="hidden" name="type" value="" />
<input type="hidden" name="sort" value="rate" />
<div class="form-group">
<div class="bt-form-input cd-form-select bt-select-query">
<div class="select" data-name="filters" data-value="">
<div class="select-enter"><svg class="icon"><use xlink:href="#icon-arrow"/></svg></div>
<span class="select-clear"><svg class="icon"><use xlink:href="#icon-close"/></svg></span>
<div class="selected-items">
<input type="search" class="form-control cd-form-control" placeholder="Describe your issue or suggestion" name="query" value="" autocomplete="off" />
</div>
<div class="items-list"></div>
</div>
</div>
</div>
</form>
<div class="bt-search-tabs">
<span class="bt-search-tab">All</span><a href="/?type=issues&sort=rate" class="bt-search-tab">Issues</a><a href="/?type=suggestions&sort=rate" class="bt-search-tab">Suggestions</a><span class="bt-search-tabs-right"></span>
</div>
</section>
</div>
</div>
</header>
<main class="container"><section class="cd-content with-trending">
<span class="bt-sort-wrap" data-value="rate">
<a class="bt-sort-item selected" data-value="rate">by rating</a>
<a class="bt-sort-item" data-value="time">by time</a>
</span><h3 class="bt-header" data-count="3377">3377 Cards</h3>
<a href="/c/746" data-layer class="bt-card-row trending" data-card-id="746">
<div class="bt-card-thumb thumb-animal thumb-icon cock thumb-color2"><span class="bt-card-thumb-status">Added</span></div>
<div class="bt-card-row-body">
<div class="bt-card-title">
About this platform
</div>
<div class="bt-card-preview"> All users are welcome to create new entries, view existing entries and vote on them. What is this for? This platform is a place where users can vote for feature suggestions for Telegram or report issues…</div>
<div class="bt-issue-footer-wrap">
<div class="bt-issue-footer">
<time datetime="2020-12-23T14:57:58+00:00" title="Dec 23, 2020 at 14:57" class="short">Dec 23, 2020</time><span class="bt-card-status"><span class="add-info">Closed</span></span><span class="add-info">Tip</span>
</div>
<div class="bt-issue-counters likes-wrap"><span class="cd-issue-replies"><span class="value">54</span><svg class="icon"><use xlink:href="#icon-replies"/></svg></span><span class="bt-issue-trending"><svg class="icon"><use xlink:href="#icon-trending"/></svg></span><span class="cd-issue-like"><span class="value">127</span><svg class="icon"><use xlink:href="#icon-like"/></svg></span></div>
</div>
</div>
</a><a href="/c/203" data-layer class="bt-card-row trending" data-card-id="203">
<div class="bt-card-thumb thumb-issue thumb-icon bumblebee thumb-color3"><span class="bt-card-thumb-status">Fixed</span></div>
<div class="bt-card-row-body">
<div class="bt-card-title">
iOS badge counter shows unread messages, even when all chats are read
</div>
<div class="bt-card-preview">Badge counters inside the app and on the app&#39;s icon may sometimes show unread messages while there are no unread chats in the list. Workaround Tap 10 times on the Settings tab icon &gt; Reindex Unread Counters.…</div>
<div class="bt-issue-footer-wrap">
<div class="bt-issue-footer">
<time datetime="2020-11-12T22:16:24+00:00" title="Nov 12, 2020 at 22:16" class="short">Nov 12, 2020</time><span class="bt-card-status"></span><span class="add-info">Issue, iOS</span>
</div>
<div class="bt-issue-counters likes-wrap"><span class="cd-issue-replies"><span class="value">9</span><svg class="icon"><use xlink:href="#icon-replies"/></svg></span><span class="bt-issue-trending"><svg class="icon"><use xlink:href="#icon-trending"/></svg></span><span class="cd-issue-like"><span class="value">73</span><svg class="icon"><use xlink:href="#icon-like"/></svg></span></div>
</div>
</div>
</a><a href="/c/174" data-layer class="bt-card-row trending" data-card-id="174">
<div class="bt-card-thumb thumb-issue" style="background-image:url('https://telegra.ph/file/thumb/e077bab5998914d8285c9.jpg')"><span class="bt-card-thumb-status">Fixed</span></div>
<div class="bt-card-row-body">
<div class="bt-card-title">
&quot;You have a new message&quot; notifications in Notification Center
</div>
<div class="bt-card-preview">Workaround Restarting the device should fix the issue. Notifications will arrive with proper message previews after reboot. &#39;You have a new message&#39; notifications arrive instead of regular notifications…</div>
<div class="bt-issue-footer-wrap">
<div class="bt-issue-footer">
<time datetime="2020-11-12T17:13:34+00:00" title="Nov 12, 2020 at 17:13" class="short">Nov 12, 2020</time><span class="bt-card-status"></span><span class="add-info">Issue, iOS</span>
</div>
<div class="bt-issue-counters likes-wrap"><span class="cd-issue-replies"><span class="value">12</span><svg class="icon"><use xlink:href="#icon-replies"/></svg></span><span class="bt-issue-trending"><svg class="icon"><use xlink:href="#icon-trending"/></svg></span><span class="cd-issue-like"><span class="value">67</span><svg class="icon"><use xlink:href="#icon-like"/></svg></span></div>
</div>
</div>
</a><a href="/c/187" data-layer class="bt-card-row trending" data-card-id="187">
<div class="bt-card-thumb thumb-issue thumb-icon madagascar-cockroach thumb-color3"><span class="bt-card-thumb-status">Fixed</span></div>
<div class="bt-card-row-body">
<div class="bt-card-title">
Distorted voice messages
</div>
<div class="bt-card-preview">Voice messages on iOS 14 devices can get broken (audio is slow, distorted). A short 5-second voice message changes in speed and duration. Workaround Disable the &#39;Sound Recognition&#39; feature in iOS Settings…</div>
<div class="bt-issue-footer-wrap">
<div class="bt-issue-footer">
<time datetime="2020-11-12T21:26:47+00:00" title="Nov 12, 2020 at 21:26" class="short">Nov 12, 2020</time><span class="bt-card-status"></span><span class="add-info">iOS, Issue</span>
</div>
<div class="bt-issue-counters likes-wrap"><span class="bt-issue-trending"><svg class="icon"><use xlink:href="#icon-trending"/></svg></span><span class="cd-issue-like"><span class="value">15</span><svg class="icon"><use xlink:href="#icon-like"/></svg></span></div>
</div>
</div>
</a><a href="/c/724" data-layer class="bt-card-row" data-card-id="724">
<div class="bt-card-thumb thumb-feature thumb-icon carambola thumb-color4"><span class="bt-card-thumb-status">Added</span></div>
<div class="bt-card-row-body">
<div class="bt-card-title">
Improve the ability to search chat history for Asian regional languages, such as Chinese and Japanese
</div>
<div class="bt-card-preview">Improve the ability to search chat history for Asian regional languages, such as Chinese and Japanese. Telegram&#39;s chat history search function is based on words, and is suitable for languages such as…</div>
<div class="bt-issue-footer-wrap">
<div class="bt-issue-footer">
<time datetime="2020-12-23T08:56:29+00:00" title="Dec 23, 2020 at 08:56" class="short">Dec 23, 2020</time><span class="bt-card-status"></span><span class="add-info">Suggestion, General</span>
</div>
<div class="bt-issue-counters likes-wrap"><span class="cd-issue-replies"><span class="value">51</span><svg class="icon"><use xlink:href="#icon-replies"/></svg></span><span class="cd-issue-like"><span class="value">2178</span><svg class="icon"><use xlink:href="#icon-like"/></svg></span></div>
</div>
</div>
</a><a href="/c/23" data-layer class="bt-card-row" data-card-id="23">
<div class="bt-card-thumb thumb-feature thumb-icon pear thumb-color7"><span class="bt-card-thumb-status">Added</span></div>
<div class="bt-card-row-body">
<div class="bt-card-title">
Emoji reactions
</div>
<div class="bt-card-preview">An option to react to messages using small emoji (e.g.<i class="emoji" style="background-image:url('//telegram.org/img/emoji/40/F09F918D.png')"><b>👍</b></i>,<i class="emoji" style="background-image:url('//telegram.org/img/emoji/40/E29DA4.png')"><b>❤️</b></i>,<i class="emoji" style="background-image:url('//telegram.org/img/emoji/40/F09F918E.png')"><b>👎</b></i>) instead of replying in the chat with messages or stickers. Use Cases 1. Quick feedback that doesn&#39;t take up space in the message history.…</div>
<div class="bt-issue-footer-wrap">
<div class="bt-issue-footer">
<time datetime="2019-11-05T14:57:58+00:00" title="Nov 5, 2019 at 14:57" class="short">Nov 5, 2019</time><span class="bt-card-status"></span><span class="add-info">Suggestion</span>
</div>
<div class="bt-issue-counters likes-wrap"><span class="cd-issue-replies"><span class="value">234</span><svg class="icon"><use xlink:href="#icon-replies"/></svg></span><span class="cd-issue-like"><span class="value">1638</span><svg class="icon"><use xlink:href="#icon-like"/></svg></span></div>
</div>
</div>
</a><a href="/c/67" data-layer class="bt-card-row" data-card-id="67">
<div class="bt-card-thumb thumb-feature thumb-icon pitaya thumb-color3"><span class="bt-card-thumb-status">Added</span></div>
<div class="bt-card-row-body">
<div class="bt-card-title">
Group Video Calls
</div>
<div class="bt-card-preview">Encrypted video calls with three or more people. Telegram has announced plans to launch group video calls in the coming months. Related suggestions: Group Voice Calls, Screen Sharing in Calls</div>
<div class="bt-issue-footer-wrap">
<div class="bt-issue-footer">
<time datetime="2019-12-11T11:50:20+00:00" title="Dec 11, 2019 at 11:50" class="short">Dec 11, 2019</time><span class="bt-card-status"></span><span class="add-info">Suggestion, Calls</span>
</div>
<div class="bt-issue-counters likes-wrap"><span class="cd-issue-replies"><span class="value">40</span><svg class="icon"><use xlink:href="#icon-replies"/></svg></span><span class="cd-issue-like"><span class="value">1401</span><svg class="icon"><use xlink:href="#icon-like"/></svg></span></div>
</div>
</div>
</a><a href="/c/808" data-layer class="bt-card-row" data-card-id="808">
<div class="bt-card-thumb thumb-feature" style="background-image:url('https://telegra.ph/file/thumb/c3fd10f0757f15620128f-07424df37b0faa0dc4.jpg')"><span class="bt-card-thumb-status">Added</span></div>
<div class="bt-card-row-body">
<div class="bt-card-title">
Cryptocurrency donations for bots, groups and channels
</div>
<div class="bt-card-preview">Show a button for sending quick donations to maintainers of bots, groups or channels using cryptocurrency. This could use either an established cryptocurrency like Bitcoin, Etherium, EOS, etc. or some…</div>
<div class="bt-issue-footer-wrap">
<div class="bt-issue-footer">
<time datetime="2020-12-25T09:04:53+00:00" title="Dec 25, 2020 at 09:04" class="short">Dec 25, 2020</time><span class="bt-card-status"></span><span class="add-info">Suggestion, General</span>
</div>
<div class="bt-issue-counters likes-wrap"><span class="cd-issue-replies"><span class="value">73</span><svg class="icon"><use xlink:href="#icon-replies"/></svg></span><span class="cd-issue-like"><span class="value">1244</span><svg class="icon"><use xlink:href="#icon-like"/></svg></span></div>
</div>
</div>
</a><a href="/c/736" data-layer class="bt-card-row" data-card-id="736">
<div class="bt-card-thumb thumb-feature thumb-icon lychee thumb-color0"><span class="bt-card-thumb-status">Added</span></div>
<div class="bt-card-row-body">
<div class="bt-card-title">
Screen sharing in calls
</div>
<div class="bt-card-preview">Screen sharing from mobile and desktop apps, in one-on-one calls and voice chats (also in group calls when they become available).</div>
<div class="bt-issue-footer-wrap">
<div class="bt-issue-footer">
<time datetime="2020-12-23T13:48:01+00:00" title="Dec 23, 2020 at 13:48" class="short">Dec 23, 2020</time><span class="bt-card-status"></span><span class="add-info">Suggestion</span>
</div>
<div class="bt-issue-counters likes-wrap"><span class="cd-issue-replies"><span class="value">49</span><svg class="icon"><use xlink:href="#icon-replies"/></svg></span><span class="cd-issue-like"><span class="value">998</span><svg class="icon"><use xlink:href="#icon-like"/></svg></span></div>
</div>
</div>
</a><a href="/c/82" data-layer class="bt-card-row" data-card-id="82">
<div class="bt-card-thumb thumb-feature thumb-icon banana thumb-color2"><span class="bt-card-thumb-status">Added</span></div>
<div class="bt-card-row-body">
<div class="bt-card-title">
Silent sign up
</div>
<div class="bt-card-preview">A feature to join Telegram incognito, making the phone number privacy set to Nobody before creating a new account. Current users who have that number added to their contacts list will not get a new c…</div>
<div class="bt-issue-footer-wrap">
<div class="bt-issue-footer">
<time datetime="2019-12-12T06:44:44+00:00" title="Dec 12, 2019 at 06:44" class="short">Dec 12, 2019</time><span class="bt-card-status"></span><span class="add-info">Suggestion</span>
</div>
<div class="bt-issue-counters likes-wrap"><span class="cd-issue-replies"><span class="value">39</span><svg class="icon"><use xlink:href="#icon-replies"/></svg></span><span class="cd-issue-like"><span class="value">913</span><svg class="icon"><use xlink:href="#icon-like"/></svg></span></div>
</div>
</div>
</a><a href="/c/80" data-layer class="bt-card-row" data-card-id="80">
<div class="bt-card-thumb thumb-feature thumb-icon apple thumb-color0"><span class="bt-card-thumb-status">Added</span></div>
<div class="bt-card-row-body">
<div class="bt-card-title">
Live video streaming
</div>
<div class="bt-card-preview">A feature to share and experience live videos across groups and channels in Telegram. Broadcasting from a channel or your personal account (in group chats) so that others can view, react, and interact.</div>
<div class="bt-issue-footer-wrap">
<div class="bt-issue-footer">
<time datetime="2019-12-12T06:27:07+00:00" title="Dec 12, 2019 at 06:27" class="short">Dec 12, 2019</time><span class="bt-card-status"></span><span class="add-info">iOS, Android, macOS, Telegram Desktop, Suggestion</span>
</div>
<div class="bt-issue-counters likes-wrap"><span class="cd-issue-replies"><span class="value">38</span><svg class="icon"><use xlink:href="#icon-replies"/></svg></span><span class="cd-issue-like"><span class="value">825</span><svg class="icon"><use xlink:href="#icon-like"/></svg></span></div>
</div>
</div>
</a><a href="/c/2775" data-layer class="bt-card-row" data-card-id="2775">
<div class="bt-card-thumb thumb-feature" style="background-image:url('https://telegra.ph/file/thumb/2320d5aaba534ba33185a-b2bbc7ded6b5481c1d.jpg')"><div class="bt-card-thumb-label">1:52</div><span class="bt-card-thumb-status">Added</span></div>
<div class="bt-card-row-body">
<div class="bt-card-title">
Emergency passcode to hide chats
</div>
<div class="bt-card-preview">Option to set an alternative passcode (&quot;double bottom&quot;) that either opens a limited set of chats, opens a different account, or destroys one of the connected accounts completely when entered. Use cases…</div>
<div class="bt-issue-footer-wrap">
<div class="bt-issue-footer">
<time datetime="2021-02-27T23:18:55+00:00" title="Feb 27 at 23:18" class="short">Feb 27</time><span class="bt-card-status"></span><span class="add-info">Suggestion</span>
</div>
<div class="bt-issue-counters likes-wrap"><span class="cd-issue-replies"><span class="value">18</span><svg class="icon"><use xlink:href="#icon-replies"/></svg></span><span class="cd-issue-like"><span class="value">732</span><svg class="icon"><use xlink:href="#icon-like"/></svg></span></div>
</div>
</div>
</a><a href="/c/383" data-layer class="bt-card-row" data-card-id="383">
<div class="bt-card-thumb thumb-feature thumb-icon pear thumb-color7"><span class="bt-card-thumb-status">Added</span></div>
<div class="bt-card-row-body">
<div class="bt-card-title">
Choose a different default folder instead of &quot;All Chats&quot;
</div>
<div class="bt-card-preview">An option to pin one of your folders as the main folder instead of All Chats. When you open the app, it would show you the folder you chose. Pressing the back button would bring you back there when you&#39;re…</div>
<div class="bt-issue-footer-wrap">
<div class="bt-issue-footer">
<time datetime="2020-11-16T23:32:01+00:00" title="Nov 16, 2020 at 23:32" class="short">Nov 16, 2020</time><span class="bt-card-status"></span><span class="add-info">Suggestion</span>
</div>
<div class="bt-issue-counters likes-wrap"><span class="cd-issue-replies"><span class="value">34</span><svg class="icon"><use xlink:href="#icon-replies"/></svg></span><span class="cd-issue-like"><span class="value">690</span><svg class="icon"><use xlink:href="#icon-like"/></svg></span></div>
</div>
</div>
</a><a href="/c/1035" data-layer class="bt-card-row" data-card-id="1035">
<div class="bt-card-thumb thumb-feature thumb-icon strawberry thumb-color3"><span class="bt-card-thumb-status">Added</span></div>
<div class="bt-card-row-body">
<div class="bt-card-title">
Allow site owners to make their own Instant View templates
</div>
<div class="bt-card-preview">Instant View templates are currently created and maintained by Telegram, the list of supported websites is expanded gradually. Some site owners would like to get IV support for their websites sooner.…</div>
<div class="bt-issue-footer-wrap">
<div class="bt-issue-footer">
<time datetime="2021-01-23T17:41:56+00:00" title="Jan 23 at 17:41" class="short">Jan 23</time><span class="bt-card-status"></span><span class="add-info">Suggestion, General</span>
</div>
<div class="bt-issue-counters likes-wrap"><span class="cd-issue-replies"><span class="value">13</span><svg class="icon"><use xlink:href="#icon-replies"/></svg></span><span class="cd-issue-like"><span class="value">673</span><svg class="icon"><use xlink:href="#icon-like"/></svg></span></div>
</div>
</div>
</a><a href="/c/32" data-layer class="bt-card-row" data-card-id="32">
<div class="bt-card-thumb thumb-feature thumb-icon raspberry thumb-color0"><span class="bt-card-thumb-status">Added</span></div>
<div class="bt-card-row-body">
<div class="bt-card-title">
In-app translator
</div>
<div class="bt-card-preview">Translating specific messages via the context menu like Twitter does for tweets. Use cases Built-in translations save a lot of time translating messages on the go would remove the need to move away…</div>
<div class="bt-issue-footer-wrap">
<div class="bt-issue-footer">
<time datetime="2019-11-05T15:18:29+00:00" title="Nov 5, 2019 at 15:18" class="short">Nov 5, 2019</time><span class="bt-card-status"></span><span class="add-info">Suggestion</span>
</div>
<div class="bt-issue-counters likes-wrap"><span class="cd-issue-replies"><span class="value">50</span><svg class="icon"><use xlink:href="#icon-replies"/></svg></span><span class="cd-issue-like"><span class="value">598</span><svg class="icon"><use xlink:href="#icon-like"/></svg></span></div>
</div>
</div>
</a><a href="/c/11" data-layer class="bt-card-row" data-card-id="11">
<div class="bt-card-thumb thumb-feature thumb-icon guava thumb-color3"><span class="bt-card-thumb-status">Added</span></div>
<div class="bt-card-row-body">
<div class="bt-card-title">
Notify all group members
</div>
<div class="bt-card-preview">An option to notify all group members or admins using a special mention (e.g. @all and @admins). Use cases Important news and major updates in big communities. Potential issues Some group admins already…</div>
<div class="bt-issue-footer-wrap">
<div class="bt-issue-footer">
<time datetime="2019-11-04T12:27:14+00:00" title="Nov 4, 2019 at 12:27" class="short">Nov 4, 2019</time><span class="bt-card-status"></span><span class="add-info">Suggestion</span>
</div>
<div class="bt-issue-counters likes-wrap"><span class="cd-issue-replies"><span class="value">40</span><svg class="icon"><use xlink:href="#icon-replies"/></svg></span><span class="cd-issue-like"><span class="value">590</span><svg class="icon"><use xlink:href="#icon-like"/></svg></span></div>
</div>
</div>
</a><a href="/c/68" data-layer class="bt-card-row" data-card-id="68">
<div class="bt-card-thumb thumb-feature thumb-icon plum thumb-color4"><span class="bt-card-thumb-status">Added</span></div>
<div class="bt-card-row-body">
<div class="bt-card-title">
Unlimited favorite stickers
</div>
<div class="bt-card-preview">Increase the limit for favorite stickers. The current limit is five stickers. When you add another one, the first sticker is replaced. Use cases Choose a limited set of stickers which you will always…</div>
<div class="bt-issue-footer-wrap">
<div class="bt-issue-footer">
<time datetime="2019-12-11T12:13:15+00:00" title="Dec 11, 2019 at 12:13" class="short">Dec 11, 2019</time><span class="bt-card-status"></span><span class="add-info">Suggestion</span>
</div>
<div class="bt-issue-counters likes-wrap"><span class="cd-issue-replies"><span class="value">24</span><svg class="icon"><use xlink:href="#icon-replies"/></svg></span><span class="cd-issue-like"><span class="value">531</span><svg class="icon"><use xlink:href="#icon-like"/></svg></span></div>
</div>
</div>
</a><a href="/c/406" data-layer class="bt-card-row" data-card-id="406">
<div class="bt-card-thumb thumb-feature thumb-icon cloudberry thumb-color6"><span class="bt-card-thumb-status">Added</span></div>
<div class="bt-card-row-body">
<div class="bt-card-title">
Alternate profile pictures
</div>
<div class="bt-card-preview">When setting a profile picture or video that&#39;s only visible to contacts (or certain users, groups etc.), allow choosing an alternate picture or video that will be shown to everyone else. Use cases -…</div>
<div class="bt-issue-footer-wrap">
<div class="bt-issue-footer">
<time datetime="2020-11-17T16:48:43+00:00" title="Nov 17, 2020 at 16:48" class="short">Nov 17, 2020</time><span class="bt-card-status"></span><span class="add-info">Suggestion</span>
</div>
<div class="bt-issue-counters likes-wrap"><span class="cd-issue-replies"><span class="value">21</span><svg class="icon"><use xlink:href="#icon-replies"/></svg></span><span class="cd-issue-like"><span class="value">506</span><svg class="icon"><use xlink:href="#icon-like"/></svg></span></div>
</div>
</div>
</a><a href="/c/407" data-layer class="bt-card-row" data-card-id="407">
<div class="bt-card-thumb thumb-feature thumb-icon currant thumb-color7"><span class="bt-card-thumb-status">Added</span></div>
<div class="bt-card-row-body">
<div class="bt-card-title">
Custom icons for folders
</div>
<div class="bt-card-preview">Add the ability to choose icons for folders on mobile platforms like in Telegram Desktop and Telegram macOS. Sync them on all devices. Use cases - Find folders you&#39;re looking for more easily. - Save…</div>
<div class="bt-issue-footer-wrap">
<div class="bt-issue-footer">
<time datetime="2020-11-17T17:11:05+00:00" title="Nov 17, 2020 at 17:11" class="short">Nov 17, 2020</time><span class="bt-card-status"></span><span class="add-info">Suggestion, iOS, Android</span>
</div>
<div class="bt-issue-counters likes-wrap"><span class="cd-issue-replies"><span class="value">11</span><svg class="icon"><use xlink:href="#icon-replies"/></svg></span><span class="cd-issue-like"><span class="value">427</span><svg class="icon"><use xlink:href="#icon-like"/></svg></span></div>
</div>
</div>
</a><a href="/c/755" data-layer class="bt-card-row" data-card-id="755">
<div class="bt-card-thumb thumb-feature thumb-icon strawberry thumb-color3"><span class="bt-card-thumb-status">Added</span></div>
<div class="bt-card-row-body">
<div class="bt-card-title">
Add Instant View to Telegram Desktop
</div>
<div class="bt-card-preview">Add Instant View to Telegram Desktop. The feature is there right now for MacOS Telegram App, but missing from regular Telegram Desktop. Preferably, it should open an article in the existing telegram window…</div>
<div class="bt-issue-footer-wrap">
<div class="bt-issue-footer">
<time datetime="2020-12-23T17:11:18+00:00" title="Dec 23, 2020 at 17:11" class="short">Dec 23, 2020</time><span class="bt-card-status"></span><span class="add-info">Suggestion, Telegram Desktop</span>
</div>
<div class="bt-issue-counters likes-wrap"><span class="cd-issue-replies"><span class="value">12</span><svg class="icon"><use xlink:href="#icon-replies"/></svg></span><span class="cd-issue-like"><span class="value">405</span><svg class="icon"><use xlink:href="#icon-like"/></svg></span></div>
</div>
</div>
</a><a href="/c/504" data-layer class="bt-card-row" data-card-id="504">
<div class="bt-card-thumb thumb-feature thumb-icon persimmon thumb-color0"><span class="bt-card-thumb-status">Added</span></div>
<div class="bt-card-row-body">
<div class="bt-card-title">
Requests to join group or channel
</div>
<div class="bt-card-preview">If enabled, the user attempting to join the group/channel will only be able to view the content and send things after being accepted by an administrator (optional: only admins who have the &quot;accept/decline…</div>
<div class="bt-issue-footer-wrap">
<div class="bt-issue-footer">
<time datetime="2020-11-23T20:47:52+00:00" title="Nov 23, 2020 at 20:47" class="short">Nov 23, 2020</time><span class="bt-card-status"></span><span class="add-info">Suggestion, General</span>
</div>
<div class="bt-issue-counters likes-wrap"><span class="cd-issue-replies"><span class="value">30</span><svg class="icon"><use xlink:href="#icon-replies"/></svg></span><span class="cd-issue-like"><span class="value">386</span><svg class="icon"><use xlink:href="#icon-like"/></svg></span></div>
</div>
</div>
</a><a href="/c/28" data-layer class="bt-card-row" data-card-id="28">
<div class="bt-card-thumb thumb-feature thumb-icon plum thumb-color4"><span class="bt-card-thumb-status">Added</span></div>
<div class="bt-card-row-body">
<div class="bt-card-title">
Separate passcode lock for specific chats or Archive
</div>
<div class="bt-card-preview">Option to lock certain chats with a separate passcode. On a chat-by-chat basis, or for an entire Chat Folder, e.g. the Archive. Use cases Family iPads and other shared devices. Can also be used in environments…</div>
<div class="bt-issue-footer-wrap">
<div class="bt-issue-footer">
<time datetime="2019-11-05T15:09:21+00:00" title="Nov 5, 2019 at 15:09" class="short">Nov 5, 2019</time><span class="bt-card-status"></span><span class="add-info">Suggestion</span>
</div>
<div class="bt-issue-counters likes-wrap"><span class="cd-issue-replies"><span class="value">10</span><svg class="icon"><use xlink:href="#icon-replies"/></svg></span><span class="cd-issue-like"><span class="value">353</span><svg class="icon"><use xlink:href="#icon-like"/></svg></span></div>
</div>
</div>
</a><a href="/c/729" data-layer class="bt-card-row" data-card-id="729">
<div class="bt-card-thumb thumb-feature thumb-icon gooseberry thumb-color1"><span class="bt-card-thumb-status">Added</span></div>
<div class="bt-card-row-body">
<div class="bt-card-title">
Call Transfers between Devices
</div>
<div class="bt-card-preview">An option to transfer ongoing calls from phone to a desktop PC and vice versa.</div>
<div class="bt-issue-footer-wrap">
<div class="bt-issue-footer">
<time datetime="2020-12-23T11:43:24+00:00" title="Dec 23, 2020 at 11:43" class="short">Dec 23, 2020</time><span class="bt-card-status"></span><span class="add-info">Suggestion, General, Calls</span>
</div>
<div class="bt-issue-counters likes-wrap"><span class="cd-issue-replies"><span class="value">6</span><svg class="icon"><use xlink:href="#icon-replies"/></svg></span><span class="cd-issue-like"><span class="value">343</span><svg class="icon"><use xlink:href="#icon-like"/></svg></span></div>
</div>
</div>
</a><a href="/c/31" data-layer class="bt-card-row" data-card-id="31">
<div class="bt-card-thumb thumb-feature thumb-icon rambutan thumb-color7"><span class="bt-card-thumb-status">Added</span></div>
<div class="bt-card-row-body">
<div class="bt-card-title">
More Two-Factor Authentication methods
</div>
<div class="bt-card-preview">An option to add an authenticator app with temporary, one-time passwords (e.g. Authy, Google Authenticator) as another second factor.</div>
<div class="bt-issue-footer-wrap">
<div class="bt-issue-footer">
<time datetime="2019-11-05T15:17:53+00:00" title="Nov 5, 2019 at 15:17" class="short">Nov 5, 2019</time><span class="bt-card-status"></span><span class="add-info">Suggestion</span>
</div>
<div class="bt-issue-counters likes-wrap"><span class="cd-issue-replies"><span class="value">7</span><svg class="icon"><use xlink:href="#icon-replies"/></svg></span><span class="cd-issue-like"><span class="value">341</span><svg class="icon"><use xlink:href="#icon-like"/></svg></span></div>
</div>
</div>
</a><a href="/c/21" data-layer class="bt-card-row" data-card-id="21">
<div class="bt-card-thumb thumb-feature thumb-icon papaya thumb-color5"><span class="bt-card-thumb-status">Added</span></div>
<div class="bt-card-row-body">
<div class="bt-card-title">
Different backgrounds for chats
</div>
<div class="bt-card-preview">A feature to set individual backgrounds for specific chats. Use cases This would make navigation between chats easier, especially for those who have lots of chats or just a visual type of person.</div>
<div class="bt-issue-footer-wrap">
<div class="bt-issue-footer">
<time datetime="2019-11-05T14:51:57+00:00" title="Nov 5, 2019 at 14:51" class="short">Nov 5, 2019</time><span class="bt-card-status"></span><span class="add-info">Suggestion</span>
</div>
<div class="bt-issue-counters likes-wrap"><span class="cd-issue-replies"><span class="value">23</span><svg class="icon"><use xlink:href="#icon-replies"/></svg></span><span class="cd-issue-like"><span class="value">319</span><svg class="icon"><use xlink:href="#icon-like"/></svg></span></div>
</div>
</div>
</a><a href="/c/65" data-layer class="bt-card-row" data-card-id="65">
<div class="bt-card-thumb thumb-feature thumb-icon physalis thumb-color1"><span class="bt-card-thumb-status">Added</span></div>
<div class="bt-card-row-body">
<div class="bt-card-title">
Disable &quot;New Contact Joined&quot; chats
</div>
<div class="bt-card-preview">Users receive a notification when one of their contacts becomes available on Telegram. It is currently possible to disable the notification: the new chats will appear in the list without sending a notification.…</div>
<div class="bt-issue-footer-wrap">
<div class="bt-issue-footer">
<time datetime="2019-12-11T11:23:35+00:00" title="Dec 11, 2019 at 11:23" class="short">Dec 11, 2019</time><span class="bt-card-status"></span><span class="add-info">Suggestion, General</span>
</div>
<div class="bt-issue-counters likes-wrap"><span class="cd-issue-replies"><span class="value">18</span><svg class="icon"><use xlink:href="#icon-replies"/></svg></span><span class="cd-issue-like"><span class="value">304</span><svg class="icon"><use xlink:href="#icon-like"/></svg></span></div>
</div>
</div>
</a><a href="/c/1964" data-layer class="bt-card-row" data-card-id="1964">
<div class="bt-card-thumb thumb-feature thumb-icon carambola thumb-color4"><span class="bt-card-thumb-status">Added</span></div>
<div class="bt-card-row-body">
<div class="bt-card-title">
Better global search
</div>
<div class="bt-card-preview">Make global search a place to find all communities in channels and public chats.</div>
<div class="bt-issue-footer-wrap">
<div class="bt-issue-footer">
<time datetime="2021-02-09T02:25:07+00:00" title="Feb 9 at 02:25" class="short">Feb 9</time><span class="bt-card-status"></span><span class="add-info">Suggestion, Android</span>
</div>
<div class="bt-issue-counters likes-wrap"><span class="cd-issue-replies"><span class="value">8</span><svg class="icon"><use xlink:href="#icon-replies"/></svg></span><span class="cd-issue-like"><span class="value">281</span><svg class="icon"><use xlink:href="#icon-like"/></svg></span></div>
</div>
</div>
</a><a href="/c/87" data-layer class="bt-card-row" data-card-id="87">
<div class="bt-card-thumb thumb-feature thumb-icon currant thumb-color7"><span class="bt-card-thumb-status">Added</span></div>
<div class="bt-card-row-body">
<div class="bt-card-title">
Starred Messages
</div>
<div class="bt-card-preview">An option to bookmark/star a message. Marking a message would add it to the separate Starred Messages section on the profile page, for quick access to messages. While Telegram doesn&#39;t have Starred Messages…</div>
<div class="bt-issue-footer-wrap">
<div class="bt-issue-footer">
<time datetime="2019-12-12T12:30:48+00:00" title="Dec 12, 2019 at 12:30" class="short">Dec 12, 2019</time><span class="bt-card-status"></span><span class="add-info">Suggestion</span>
</div>
<div class="bt-issue-counters likes-wrap"><span class="cd-issue-replies"><span class="value">62</span><svg class="icon"><use xlink:href="#icon-replies"/></svg></span><span class="cd-issue-like"><span class="value">258</span><svg class="icon"><use xlink:href="#icon-like"/></svg></span></div>
</div>
</div>
</a><a href="/c/385" data-layer class="bt-card-row" data-card-id="385">
<div class="bt-card-thumb thumb-feature thumb-icon physalis thumb-color1"><span class="bt-card-thumb-status">Added</span></div>
<div class="bt-card-row-body">
<div class="bt-card-title">
Show folders when forwarding a message
</div>
<div class="bt-card-preview">An option to see your folders when sharing or forwarding messages. Use case Find the chats you were looking for more quickly. Workarounds - Use the search option to find the chat if it&#39;s not at the top.…</div>
<div class="bt-issue-footer-wrap">
<div class="bt-issue-footer">
<time datetime="2020-11-17T02:05:56+00:00" title="Nov 17, 2020 at 02:05" class="short">Nov 17, 2020</time><span class="bt-card-status"></span><span class="add-info">Suggestion</span>
</div>
<div class="bt-issue-counters likes-wrap"><span class="cd-issue-replies"><span class="value">4</span><svg class="icon"><use xlink:href="#icon-replies"/></svg></span><span class="cd-issue-like"><span class="value">247</span><svg class="icon"><use xlink:href="#icon-like"/></svg></span></div>
</div>
</div>
</a><a href="/c/772" data-layer class="bt-card-row" data-card-id="772">
<div class="bt-card-thumb thumb-feature thumb-icon honeysuckle thumb-color4"><span class="bt-card-thumb-status">Added</span></div>
<div class="bt-card-row-body">
<div class="bt-card-title">
Transfer ownership if creator account was deleted
</div>
<div class="bt-card-preview">Option to transfer ownership in groups and channels if the creator was deleted so the first admin with all permissions will become a creator&#33; Thumbs up if you want this to happen <i class="emoji" style="background-image:url('//telegram.org/img/emoji/40/F09F918D.png')"><b>👍</b></i> App: all</div>
<div class="bt-issue-footer-wrap">
<div class="bt-issue-footer">
<time datetime="2020-12-24T04:47:10+00:00" title="Dec 24, 2020 at 04:47" class="short">Dec 24, 2020</time><span class="bt-card-status"></span><span class="add-info">Suggestion, General</span>
</div>
<div class="bt-issue-counters likes-wrap"><span class="cd-issue-replies"><span class="value">21</span><svg class="icon"><use xlink:href="#icon-replies"/></svg></span><span class="cd-issue-like"><span class="value">238</span><svg class="icon"><use xlink:href="#icon-like"/></svg></span></div>
</div>
</div>
</a><a href="/c/34" data-layer class="bt-card-row" data-card-id="34">
<div class="bt-card-thumb thumb-feature thumb-icon rose-hip thumb-color2"><span class="bt-card-thumb-status">Added</span></div>
<div class="bt-card-row-body">
<div class="bt-card-title">
Bookmarks in channels
</div>
<div class="bt-card-preview">A feature to mark a message in a channel, and to continue reading the channel from this message. Use cases Long stories, broadcasts, and &#39;I will read it later&#39; situations. Workaround Forwarding a message…</div>
<div class="bt-issue-footer-wrap">
<div class="bt-issue-footer">
<time datetime="2019-11-05T15:31:30+00:00" title="Nov 5, 2019 at 15:31" class="short">Nov 5, 2019</time><span class="bt-card-status"></span><span class="add-info">Suggestion</span>
</div>
<div class="bt-issue-counters likes-wrap"><span class="cd-issue-replies"><span class="value">14</span><svg class="icon"><use xlink:href="#icon-replies"/></svg></span><span class="cd-issue-like"><span class="value">233</span><svg class="icon"><use xlink:href="#icon-like"/></svg></span></div>
</div>
</div>
</a><a href="/c/27" data-layer class="bt-card-row" data-card-id="27">
<div class="bt-card-thumb thumb-feature thumb-icon pitaya thumb-color3"><span class="bt-card-thumb-status">Added</span></div>
<div class="bt-card-row-body">
<div class="bt-card-title">
Privacy settings for Bio
</div>
<div class="bt-card-preview">The Bio section in Telegram profiles is currently always public. Add an option to configure &#39;Who can see your bio?&#39; to the Privacy and Security Settings. Use cases Putting more sensitive or private info…</div>
<div class="bt-issue-footer-wrap">
<div class="bt-issue-footer">
<time datetime="2019-11-05T15:07:41+00:00" title="Nov 5, 2019 at 15:07" class="short">Nov 5, 2019</time><span class="bt-card-status"></span><span class="add-info">Suggestion</span>
</div>
<div class="bt-issue-counters likes-wrap"><span class="cd-issue-replies"><span class="value">8</span><svg class="icon"><use xlink:href="#icon-replies"/></svg></span><span class="cd-issue-like"><span class="value">230</span><svg class="icon"><use xlink:href="#icon-like"/></svg></span></div>
</div>
</div>
</a><a href="/c/69" data-layer class="bt-card-row" data-card-id="69">
<div class="bt-card-thumb thumb-feature thumb-icon pomegrenate thumb-color5"><span class="bt-card-thumb-status">Added</span></div>
<div class="bt-card-row-body">
<div class="bt-card-title">
Automatically use the best proxy in the list
</div>
<div class="bt-card-preview">An option to automatically check and connect to the best MTProxy if several proxies are available.</div>
<div class="bt-issue-footer-wrap">
<div class="bt-issue-footer">
<time datetime="2019-12-11T12:27:35+00:00" title="Dec 11, 2019 at 12:27" class="short">Dec 11, 2019</time><span class="bt-card-status"></span><span class="add-info">Suggestion</span>
</div>
<div class="bt-issue-counters likes-wrap"><span class="cd-issue-replies"><span class="value">5</span><svg class="icon"><use xlink:href="#icon-replies"/></svg></span><span class="cd-issue-like"><span class="value">220</span><svg class="icon"><use xlink:href="#icon-like"/></svg></span></div>
</div>
</div>
</a><a href="/c/742" data-layer class="bt-card-row" data-card-id="742">
<div class="bt-card-thumb thumb-feature thumb-icon peach thumb-color6"><span class="bt-card-thumb-status">Added</span></div>
<div class="bt-card-row-body">
<div class="bt-card-title">
Way to mark messages as sensitive
</div>
<div class="bt-card-preview">An option to mark a message or photo as sensitive before sending. Sensitive messages can be revealed or re-hidden with a tap and default to hidden when a chat is opened. App: all</div>
<div class="bt-issue-footer-wrap">
<div class="bt-issue-footer">
<time datetime="2020-12-23T14:31:55+00:00" title="Dec 23, 2020 at 14:31" class="short">Dec 23, 2020</time><span class="bt-card-status"></span><span class="add-info">Suggestion, General</span>
</div>
<div class="bt-issue-counters likes-wrap"><span class="cd-issue-replies"><span class="value">6</span><svg class="icon"><use xlink:href="#icon-replies"/></svg></span><span class="cd-issue-like"><span class="value">211</span><svg class="icon"><use xlink:href="#icon-like"/></svg></span></div>
</div>
</div>
</a><a href="/c/84" data-layer class="bt-card-row" data-card-id="84">
<div class="bt-card-thumb thumb-feature thumb-icon carambola thumb-color4"><span class="bt-card-thumb-status">Added</span></div>
<div class="bt-card-row-body">
<div class="bt-card-title">
Detailed &#39;Read&#39; status: time when read, who read messages in groups
</div>
<div class="bt-card-preview">A message info screen with more information about the &#39;read&#39; status of messages: When the message was read in private chats. Which group members read the message and at what time. Use cases Knowing…</div>
<div class="bt-issue-footer-wrap">
<div class="bt-issue-footer">
<time datetime="2019-12-12T12:15:21+00:00" title="Dec 12, 2019 at 12:15" class="short">Dec 12, 2019</time><span class="bt-card-status"></span><span class="add-info">Suggestion</span>
</div>
<div class="bt-issue-counters likes-wrap"><span class="cd-issue-replies"><span class="value">39</span><svg class="icon"><use xlink:href="#icon-replies"/></svg></span><span class="cd-issue-like"><span class="value">202</span><svg class="icon"><use xlink:href="#icon-like"/></svg></span></div>
</div>
</div>
</a><a href="/c/79" data-layer class="bt-card-row" data-card-id="79">
<div class="bt-card-thumb thumb-feature thumb-icon watermelon thumb-color7"><span class="bt-card-thumb-status">Added</span></div>
<div class="bt-card-row-body">
<div class="bt-card-title">
File manager
</div>
<div class="bt-card-preview">A feature for viewing, moving, selecting, and deleting all downloaded/cached items (files, media, etc.) in one place, perhaps under Storage Usage in the app&#39;s Settings. This can also be enhanced with…</div>
<div class="bt-issue-footer-wrap">
<div class="bt-issue-footer">
<time datetime="2019-12-12T06:20:59+00:00" title="Dec 12, 2019 at 06:20" class="short">Dec 12, 2019</time><span class="bt-card-status"></span><span class="add-info">Suggestion</span>
</div>
<div class="bt-issue-counters likes-wrap"><span class="cd-issue-replies"><span class="value">7</span><svg class="icon"><use xlink:href="#icon-replies"/></svg></span><span class="cd-issue-like"><span class="value">190</span><svg class="icon"><use xlink:href="#icon-like"/></svg></span></div>
</div>
</div>
</a><a href="/c/726" data-layer class="bt-card-row" data-card-id="726">
<div class="bt-card-thumb thumb-feature thumb-icon cloudberry thumb-color6"><span class="bt-card-thumb-status">Added</span></div>
<div class="bt-card-row-body">
<div class="bt-card-title">
Recording calls
</div>
<div class="bt-card-preview">Add ability to record calls in app App: all</div>
<div class="bt-issue-footer-wrap">
<div class="bt-issue-footer">
<time datetime="2020-12-23T09:45:51+00:00" title="Dec 23, 2020 at 09:45" class="short">Dec 23, 2020</time><span class="bt-card-status"></span><span class="add-info">Suggestion, General</span>
</div>
<div class="bt-issue-counters likes-wrap"><span class="cd-issue-replies"><span class="value">19</span><svg class="icon"><use xlink:href="#icon-replies"/></svg></span><span class="cd-issue-like"><span class="value">183</span><svg class="icon"><use xlink:href="#icon-like"/></svg></span></div>
</div>
</div>
</a><a href="/c/451" data-layer class="bt-card-row" data-card-id="451">
<div class="bt-card-thumb thumb-feature" style="background-image:url('https://telegra.ph/file/thumb/6f842151a16c53cf5fe9c.jpg')"><div class="bt-card-thumb-label">0:34</div><span class="bt-card-thumb-status">Added</span></div>
<div class="bt-card-row-body">
<div class="bt-card-title">
In-Call Messaging
</div>
<div class="bt-card-preview">Reply to incoming messages from your call partner without leaving another page currently open in the app. Demo 00:19 on the attached video.</div>
<div class="bt-issue-footer-wrap">
<div class="bt-issue-footer">
<time datetime="2020-11-19T15:50:35+00:00" title="Nov 19, 2020 at 15:50" class="short">Nov 19, 2020</time><span class="bt-card-status"></span><span class="add-info">Suggestion, Calls</span>
</div>
<div class="bt-issue-counters likes-wrap"><span class="cd-issue-replies"><span class="value">5</span><svg class="icon"><use xlink:href="#icon-replies"/></svg></span><span class="cd-issue-like"><span class="value">183</span><svg class="icon"><use xlink:href="#icon-like"/></svg></span></div>
</div>
</div>
</a><a href="/c/789" data-layer class="bt-card-row" data-card-id="789">
<div class="bt-card-thumb thumb-feature thumb-icon pomegrenate thumb-color5"><span class="bt-card-thumb-status">Added</span></div>
<div class="bt-card-row-body">
<div class="bt-card-title">
Change file names in Telegram
</div>
<div class="bt-card-preview">Option to change file name on Telegram without needing to re-upload the file. App: all</div>
<div class="bt-issue-footer-wrap">
<div class="bt-issue-footer">
<time datetime="2020-12-24T15:54:23+00:00" title="Dec 24, 2020 at 15:54" class="short">Dec 24, 2020</time><span class="bt-card-status"></span><span class="add-info">Suggestion, General</span>
</div>
<div class="bt-issue-counters likes-wrap"><span class="cd-issue-replies"><span class="value">14</span><svg class="icon"><use xlink:href="#icon-replies"/></svg></span><span class="cd-issue-like"><span class="value">171</span><svg class="icon"><use xlink:href="#icon-like"/></svg></span></div>
</div>
</div>
</a><a href="/c/739" data-layer class="bt-card-row" data-card-id="739">
<div class="bt-card-thumb thumb-feature thumb-icon mangosteen thumb-color3"><span class="bt-card-thumb-status">Added</span></div>
<div class="bt-card-row-body">
<div class="bt-card-title">
Statistics for Bots
</div>
<div class="bt-card-preview">An option to view Bot statistics in Bot Father, for example how many users started a conversation with the Bot&#33; App: all</div>
<div class="bt-issue-footer-wrap">
<div class="bt-issue-footer">
<time datetime="2020-12-23T13:53:45+00:00" title="Dec 23, 2020 at 13:53" class="short">Dec 23, 2020</time><span class="bt-card-status"></span><span class="add-info">Suggestion, Bot API</span>
</div>
<div class="bt-issue-counters likes-wrap"><span class="cd-issue-replies"><span class="value">9</span><svg class="icon"><use xlink:href="#icon-replies"/></svg></span><span class="cd-issue-like"><span class="value">170</span><svg class="icon"><use xlink:href="#icon-like"/></svg></span></div>
</div>
</div>
</a><a href="/c/1316" data-layer class="bt-card-row" data-card-id="1316">
<div class="bt-card-thumb thumb-feature" style="background-image:url('https://telegra.ph/file/thumb/9aadbf40ac038b66a2694-eb29c70b2b4aebcdf6.jpg')"><span class="bt-card-thumb-status">Added</span></div>
<div class="bt-card-row-body">
<div class="bt-card-title">
Allow to remove &quot;Your contacts on Telegram&quot; from the home page
</div>
<div class="bt-card-preview">The &quot;contacts on Telegram&quot; section is currently shown in the chat list when you have fewer than 10 chats. Workaround Have more than 10 chats in your list. </div>
<div class="bt-issue-footer-wrap">
<div class="bt-issue-footer">
<time datetime="2021-01-29T08:10:48+00:00" title="Jan 29 at 08:10" class="short">Jan 29</time><span class="bt-card-status"><span class="add-info">Closed</span></span><span class="add-info">Suggestion, Android</span>
</div>
<div class="bt-issue-counters likes-wrap"><span class="cd-issue-replies"><span class="value">51</span><svg class="icon"><use xlink:href="#icon-replies"/></svg></span><span class="cd-issue-like"><span class="value">167</span><svg class="icon"><use xlink:href="#icon-like"/></svg></span></div>
</div>
</div>
</a><a href="/c/824" data-layer class="bt-card-row" data-card-id="824">
<div class="bt-card-thumb thumb-feature" style="background-image:url('https://telegra.ph/file/thumb/edd42527ffa14fa26c0e0-5089339f9956665894.jpg')"><span class="bt-card-thumb-status">Added</span></div>
<div class="bt-card-row-body">
<div class="bt-card-title">
Syntax highlighting in code blocks
</div>
<div class="bt-card-preview">An optional extension to the backtick syntax to specify a language to highlight. Similar examples are the likes of Gitlab and GitHub comments.</div>
<div class="bt-issue-footer-wrap">
<div class="bt-issue-footer">
<time datetime="2020-12-27T09:29:16+00:00" title="Dec 27, 2020 at 09:29" class="short">Dec 27, 2020</time><span class="bt-card-status"></span><span class="add-info">Suggestion, General</span>
</div>
<div class="bt-issue-counters likes-wrap"><span class="cd-issue-replies"><span class="value">5</span><svg class="icon"><use xlink:href="#icon-replies"/></svg></span><span class="cd-issue-like"><span class="value">164</span><svg class="icon"><use xlink:href="#icon-like"/></svg></span></div>
</div>
</div>
</a><a href="/c/83" data-layer class="bt-card-row" data-card-id="83">
<div class="bt-card-thumb thumb-feature thumb-icon blueberry thumb-color3"><span class="bt-card-thumb-status">Added</span></div>
<div class="bt-card-row-body">
<div class="bt-card-title">
Stories / Statuses
</div>
<div class="bt-card-preview">An option to share moments (media, like photos or short videos, texts, etc.) with your mutual contacts (this can be adapted with granular privacy permissions) to view, interact, and forward. Such statuses…</div>
<div class="bt-issue-footer-wrap">
<div class="bt-issue-footer">
<time datetime="2019-12-12T12:09:13+00:00" title="Dec 12, 2019 at 12:09" class="short">Dec 12, 2019</time><span class="bt-card-status"></span><span class="add-info">Suggestion</span>
</div>
<div class="bt-issue-counters likes-wrap"><span class="cd-issue-replies"><span class="value">360</span><svg class="icon"><use xlink:href="#icon-replies"/></svg></span><span class="cd-issue-like"><span class="value">158</span><svg class="icon"><use xlink:href="#icon-like"/></svg></span></div>
</div>
</div>
</a><a href="/c/37" data-layer class="bt-card-row" data-card-id="37">
<div class="bt-card-thumb thumb-feature thumb-icon tamarind thumb-color5"><span class="bt-card-thumb-status">Added</span></div>
<div class="bt-card-row-body">
<div class="bt-card-title">
Hide messages from blocked users in groups
</div>
<div class="bt-card-preview">Sometimes you don&#39;t want to see messages from people you blocked, even in the groups you share with them. Such messages could be automatically collapsed and hidden under a spoiler (like &#39;You blocked Doge.…</div>
<div class="bt-issue-footer-wrap">
<div class="bt-issue-footer">
<time datetime="2019-11-05T15:36:24+00:00" title="Nov 5, 2019 at 15:36" class="short">Nov 5, 2019</time><span class="bt-card-status"></span><span class="add-info">Suggestion</span>
</div>
<div class="bt-issue-counters likes-wrap"><span class="cd-issue-replies"><span class="value">25</span><svg class="icon"><use xlink:href="#icon-replies"/></svg></span><span class="cd-issue-like"><span class="value">151</span><svg class="icon"><use xlink:href="#icon-like"/></svg></span></div>
</div>
</div>
</a><a href="/c/40" data-layer class="bt-card-row" data-card-id="40">
<div class="bt-card-thumb thumb-feature thumb-icon apple thumb-color0"><span class="bt-card-thumb-status">Added</span></div>
<div class="bt-card-row-body">
<div class="bt-card-title">
Group Voice Calls
</div>
<div class="bt-card-preview">Voice calls with three or more people. Related suggestion: Group Video Calls Workaround You can use Voice Chats in any of your groups to achieve similar goals. </div>
<div class="bt-issue-footer-wrap">
<div class="bt-issue-footer">
<time datetime="2019-11-06T10:55:49+00:00" title="Nov 6, 2019 at 10:55" class="short">Nov 6, 2019</time><span class="bt-card-status"></span><span class="add-info">Suggestion, Calls</span>
</div>
<div class="bt-issue-counters likes-wrap"><span class="cd-issue-replies"><span class="value">15</span><svg class="icon"><use xlink:href="#icon-replies"/></svg></span><span class="cd-issue-like"><span class="value">150</span><svg class="icon"><use xlink:href="#icon-like"/></svg></span></div>
</div>
</div>
</a><a href="/c/904" data-layer class="bt-card-row" data-card-id="904">
<div class="bt-card-thumb thumb-feature thumb-icon persimmon thumb-color0"><span class="bt-card-thumb-status">Added</span></div>
<div class="bt-card-row-body">
<div class="bt-card-title">
Secret Chats on Telegram Desktop
</div>
<div class="bt-card-preview">An option to create Secret Chats using the multiplatform Telegram Desktop client.</div>
<div class="bt-issue-footer-wrap">
<div class="bt-issue-footer">
<time datetime="2021-01-05T09:42:49+00:00" title="Jan 5 at 09:42" class="short">Jan 5</time><span class="bt-card-status"></span><span class="add-info">Suggestion, Telegram Desktop</span>
</div>
<div class="bt-issue-counters likes-wrap"><span class="cd-issue-replies"><span class="value">7</span><svg class="icon"><use xlink:href="#icon-replies"/></svg></span><span class="cd-issue-like"><span class="value">146</span><svg class="icon"><use xlink:href="#icon-like"/></svg></span></div>
</div>
</div>
</a><a href="/c/743" data-layer class="bt-card-row" data-card-id="743">
<div class="bt-card-thumb thumb-feature thumb-icon pear thumb-color7"><span class="bt-card-thumb-status">Added</span></div>
<div class="bt-card-row-body">
<div class="bt-card-title">
Feed or Stream with posts from Subscribed Channels
</div>
<div class="bt-card-preview">Show posts from channels you&#39;re subsribed to in a single view, one post after another without the need to open each channel seprately to see what&#39;s new. Like Twitter and other feed-based social networks.…</div>
<div class="bt-issue-footer-wrap">
<div class="bt-issue-footer">
<time datetime="2020-12-23T14:43:00+00:00" title="Dec 23, 2020 at 14:43" class="short">Dec 23, 2020</time><span class="bt-card-status"></span><span class="add-info">Suggestion, General</span>
</div>
<div class="bt-issue-counters likes-wrap"><span class="cd-issue-replies"><span class="value">39</span><svg class="icon"><use xlink:href="#icon-replies"/></svg></span><span class="cd-issue-like"><span class="value">145</span><svg class="icon"><use xlink:href="#icon-like"/></svg></span></div>
</div>
</div>
</a><a href="/c/1050" data-layer class="bt-card-row" data-card-id="1050">
<div class="bt-card-thumb thumb-feature" style="background-image:url('https://telegra.ph/file/thumb/20212d5f1082687d28079-b578971215660401f7.jpg')"><span class="bt-card-thumb-status">Added</span></div>
<div class="bt-card-row-body">
<div class="bt-card-title">
Partial reply
</div>
<div class="bt-card-preview">Reply only on parts of a message. This would be very useful, if someone wrote a very long message and you only want to refer to one or two sentences - or even only one or a few words.  If you click on…</div>
<div class="bt-issue-footer-wrap">
<div class="bt-issue-footer">
<time datetime="2021-01-23T21:44:26+00:00" title="Jan 23 at 21:44" class="short">Jan 23</time><span class="bt-card-status"></span><span class="add-info">Suggestion, General</span>
</div>
<div class="bt-issue-counters likes-wrap"><span class="cd-issue-replies"><span class="value">9</span><svg class="icon"><use xlink:href="#icon-replies"/></svg></span><span class="cd-issue-like"><span class="value">140</span><svg class="icon"><use xlink:href="#icon-like"/></svg></span></div>
</div>
</div>
</a><a href="/c/858" data-layer class="bt-card-row" data-card-id="858">
<div class="bt-card-thumb thumb-feature thumb-icon mango thumb-color2"><span class="bt-card-thumb-status">Added</span></div>
<div class="bt-card-row-body">
<div class="bt-card-title">
Sign up for Telegram without a phone number
</div>
<div class="bt-card-preview">You currently need a phone number to sign up for Telegram. Add an option to sign up using an email address or another method, like some messengers do (e.g., Wire, Matrix, Threema, Session). Potential…</div>
<div class="bt-issue-footer-wrap">
<div class="bt-issue-footer">
<time datetime="2020-12-30T08:46:05+00:00" title="Dec 30, 2020 at 08:46" class="short">Dec 30, 2020</time><span class="bt-card-status"></span><span class="add-info">Suggestion, General</span>
</div>
<div class="bt-issue-counters likes-wrap"><span class="cd-issue-replies"><span class="value">60</span><svg class="icon"><use xlink:href="#icon-replies"/></svg></span><span class="cd-issue-like"><span class="value">131</span><svg class="icon"><use xlink:href="#icon-like"/></svg></span></div>
</div>
</div>
</a><a href="/c/1066" data-layer class="bt-card-row" data-card-id="1066">
<div class="bt-card-thumb thumb-feature" style="background-image:url('https://telegra.ph/file/thumb/42a571d0d1c575711cb36-3d864e40c21005a825.jpg')"><span class="bt-card-thumb-status">Added</span></div>
<div class="bt-card-row-body">
<div class="bt-card-title">
Tmail - Telegram Email Service
</div>
<div class="bt-card-preview">Telegram is a great messenger, but it can also be a great Email service. So without further introductions, let&#39;s start. Mail app can be separated or it can simply be integrated inside the Telegram messenger…</div>
<div class="bt-issue-footer-wrap">
<div class="bt-issue-footer">
<time datetime="2021-01-24T12:37:49+00:00" title="Jan 24 at 12:37" class="short">Jan 24</time><span class="bt-card-status"></span><span class="add-info">Suggestion, General</span>
</div>
<div class="bt-issue-counters likes-wrap"><span class="cd-issue-replies"><span class="value">17</span><svg class="icon"><use xlink:href="#icon-replies"/></svg></span><span class="cd-issue-like"><span class="value">124</span><svg class="icon"><use xlink:href="#icon-like"/></svg></span></div>
</div>
</div>
</a><div class="bt-load-more-wrap js-load-more" data-offset="50"><a class="bt-load-more" data-loading="Loading"></a></div>
</section></main>
</div><div class="popup-container login-popup-container hide" id="login-popup-container">
<div class="popup">
<div class="popup-body">
<section>
<h2>Log In</h2>
<p>Log in here to report bugs or suggest features. Please enter your <b>phone number</b> in the <a target="_blank" rel="noopener" href="https://telegram.org/faq#login-and-sms">international format</a> and we will send a confirmation message to your account via Telegram.</p>
<form id="send-form" class="login-form">
<div class="form-group">
<input type="tel" class="form-control cd-form-control input-lg" id="phone-number" placeholder="+12223334455" autocomplete="off"/>
</div>
<div class="popup-buttons">
<a class="btn btn-link btn-lg login-cancel-btn">Cancel</a><button type="submit" class="btn btn-link btn-lg">Next</button>
</div>
</form>
<div id="login-form" class="hide">
<div class="form-group">
<span class="form-control cd-form-control input input-lg input-disabled"><strong id="phone-number-field"></strong> (<a class="login-back" href="/auth">Incorrect?</a>)</span>
<p class="help-block dots-animated">We&#39;ve just sent you a message.<br/>Please confirm access via Telegram</p>
</div>
<div class="popup-buttons">
<a class="btn btn-link btn-lg login-cancel-btn">Cancel</a><a class="btn btn-link btn-lg login-back">Back</a>
</div>
</div>
</section>
</div>
</div>
</div></div>
<script src="/js/jquery.min.js?1"></script>
<script src="/js/bootstrap.min.js"></script>
<script src="/js/main-aj.js?48"></script>
<script src="/js/bugtracker.js?66"></script>
<script src="/js/jquery-ui.min.js?1"></script>
<script src="/js/codemirror/codemirror.js?1"></script>
<script src="/js/codemirror/overlay.js?1"></script>
<script src="/js/codemirror/markdown.js?1"></script>
<script src="/js/codemirror/gfm.js?1"></script>
<script>ajInit({"version":417,"apiUrl":"\/api?hash=594e9a88e74e0fe82f","unauth":true,"state":{"queryValues":[{"prefix":"s:","val":0,"name":"Open","field":"status","group":"s","class":"c-cyan"},{"prefix":"s:","val":2,"name":"Closed","field":"status","group":"s","class":"c-orange"},{"prefix":"s:","val":1,"name":"Fix coming","field":"status","group":"s","class":"c-lightgreen"},{"prefix":"s:","val":3,"name":"Fixed","field":"status","group":"s","class":"c-green"},{"prefix":"t:","val":26,"name":"General","field":"tag_ids"},{"prefix":"t:","val":2,"name":"Android","field":"tag_ids"},{"prefix":"t:","val":1,"name":"iOS","field":"tag_ids"},{"prefix":"t:","val":4,"name":"Telegram Desktop","field":"tag_ids"},{"prefix":"t:","val":3,"name":"macOS","field":"tag_ids"},{"prefix":"t:","val":22,"name":"Web","field":"tag_ids"},{"prefix":"t:","val":19,"name":"Android X","field":"tag_ids"},{"prefix":"t:","val":25,"name":"Bot API","field":"tag_ids"},{"prefix":"t:","val":29,"name":"Accessibility","field":"tag_ids"},{"prefix":"t:","val":31,"name":"Calls","field":"tag_ids"},{"prefix":"t:","val":30,"name":"Tablet","field":"tag_ids"},{"prefix":"t:","val":13,"name":"Tip","field":"tag_ids"},{"prefix":"t:","val":40,"name":"WebK","field":"tag_ids"},{"prefix":"t:","val":41,"name":"WebZ","field":"tag_ids"}],"emptyValues":[],"searchMethod":"searchIssues","headerLangKey":"WEB_N_CARDS_HEADER","headerNullLangKey":"WEB_CARDS_HEADER"},"layer":true});</script>
<script id="aj_script">l.add({"WEB_NO_TAGS_FOUND":"No tags found","WEB_N_CARDS_HEADER":"{{n:# Card|# Cards}}","WEB_CARDS_HEADER":"Cards"});
Filters.init();
Bugtracker.init();
Aj.onLoad(function(state) {
function requestConfirmation(event) {
event && event.preventDefault();
var phone = $('#phone-number').val();
$.ajax({
type: 'POST',
url: '/auth/request',
data: {
phone: phone
},
success: function(result) {
$('#phone-number-field').text(phone);
$('#send-form').addClass('hide');
$('#login-form').removeClass('hide');
checkAuth(result.temp_session);
},
error: function(xhr) {
showAlert(xhr.responseText || 'Server error');
},
dataType: 'json'
});
return false;
}
function cancelConfirmation(event) {
event && event.preventDefault();
$('#phone-number-field').text('');
$('#send-form').removeClass('hide');
$('#login-form').addClass('hide');
$('#phone-number').focus();
clearTimeout(window.authTimeout);
return false;
}
function checkAuth(temp_session) {
clearTimeout(window.authTimeout);
window.authTimeout = setTimeout(function doCheckAuth() {
$.ajax({
type: 'POST',
url: '/auth/login',
data: {
temp_session: temp_session
},
success: function(result) {
if (result) {
location.reload();
} else {
checkAuth(temp_session);
}
},
error: function (xhr) {
showAlert(xhr.responseText || 'Server error');
},
dataType: 'json'
});
}, 700);
}
$('#login-popup-container').on('popup:open', function() {
$('#phone-number').focus();
});
$('#login-popup-container').on('popup:close', function() {
cancelConfirmation();
if (location.pathname == '/auth') {
window.history && history.replaceState(null, null, '/');
}
});
$('#login-popup-container #send-form').on('submit', requestConfirmation);
$('#login-popup-container .login-cancel-btn').on('click', function(e) {
e.preventDefault();
closePopup('#login-popup-container');
});
$('#login-popup-container .login-back').on('click', cancelConfirmation);
$('header .login-link').on('click', function(e) {
e.stopImmediatePropagation();
e.preventDefault();
openPopup('#login-popup-container');
});
});
Aj.onUnload(function(state) {
$('#login-popup-container').off('popup:open');
$('#login-popup-container').off('popup:close');
$('#login-popup-container #send-form').off('submit');
$('#login-popup-container .login-cancel-btn').off('click');
$('#login-popup-container .login-back').off('click');
$('header .login-link').off('click');
});
</script>
<script>Aj.pageLoaded();</script>
</body>
</html>
<!-- page generated in 70.24ms -->

File diff suppressed because it is too large Load diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,372 @@
/* BASICS */
.CodeMirror {
/* Set height, width, borders, and global font properties here */
font-family: monospace;
height: 300px;
color: black;
}
/* PADDING */
.CodeMirror-lines {
padding: 4px 0; /* Vertical padding around content */
}
.CodeMirror pre {
padding: 0 4px; /* Horizontal padding of content */
}
.CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler {
background-color: white; /* The little square between H and V scrollbars */
}
/* GUTTER */
.CodeMirror-gutters {
border-right: 1px solid #ddd;
background-color: #f7f7f7;
white-space: nowrap;
}
.CodeMirror-linenumbers {}
.CodeMirror-linenumber {
padding: 0 3px 0 5px;
min-width: 20px;
text-align: right;
color: #999;
white-space: nowrap;
}
.CodeMirror-guttermarker { color: black; }
.CodeMirror-guttermarker-subtle { color: #999; }
/* CURSOR */
.CodeMirror-cursor {
border-left: 1px solid black;
border-right: none;
width: 0;
}
/* Shown when moving in bi-directional text */
.CodeMirror div.CodeMirror-secondarycursor {
border-left: 1px solid silver;
}
.cm-fat-cursor .CodeMirror-cursor {
width: auto;
border: 0;
background: #7e7;
}
.cm-fat-cursor div.CodeMirror-cursors {
z-index: 1;
}
.cm-animate-fat-cursor {
width: auto;
border: 0;
-webkit-animation: blink 1.06s steps(1) infinite;
-moz-animation: blink 1.06s steps(1) infinite;
animation: blink 1.06s steps(1) infinite;
background-color: #7e7;
}
@-moz-keyframes blink {
0% {}
50% { background-color: transparent; }
100% {}
}
@-webkit-keyframes blink {
0% {}
50% { background-color: transparent; }
100% {}
}
@keyframes blink {
0% {}
50% { background-color: transparent; }
100% {}
}
/* Can style cursor different in overwrite (non-insert) mode */
.CodeMirror-overwrite .CodeMirror-cursor {}
.cm-tab { display: inline-block; text-decoration: inherit; }
.CodeMirror-ruler {
border-left: 1px solid #ccc;
position: absolute;
}
/* DEFAULT THEME */
.cm-s-default .cm-header {color: blue;}
.cm-s-default .cm-quote {color: #090;}
.cm-negative {color: #d44;}
.cm-positive {color: #292;}
.cm-header, .cm-strong {font-weight: bold;}
.cm-em {font-style: italic;}
.cm-link {text-decoration: underline;}
.cm-strikethrough {text-decoration: line-through;}
.cm-s-default .cm-keyword {color: #708;}
.cm-s-default .cm-atom {color: #219;}
.cm-s-default .cm-number {color: #164;}
.cm-s-default .cm-def {color: #00f;}
.cm-s-default .cm-variable,
.cm-s-default .cm-punctuation,
.cm-s-default .cm-property,
.cm-s-default .cm-operator {}
.cm-s-default .cm-variable-2 {color: #05a;}
.cm-s-default .cm-variable-3 {color: #085;}
.cm-s-default .cm-comment {color: #a50;}
.cm-s-default .cm-string {color: #a11;}
.cm-s-default .cm-string-2 {color: #f50;}
.cm-s-default .cm-meta {color: #555;}
.cm-s-default .cm-qualifier {color: #555;}
.cm-s-default .cm-builtin {color: #30a;}
.cm-s-default .cm-bracket {color: #997;}
.cm-s-default .cm-tag {color: #170;}
.cm-s-default .cm-attribute {color: #00c;}
.cm-s-default .cm-hr {color: #999;}
.cm-s-default .cm-link {color: #00c;}
.cm-s-default .cm-error {color: #f00;}
.cm-invalidchar {color: #f00;}
.CodeMirror-composing { border-bottom: 2px solid; }
/* Default styles for common addons */
div.CodeMirror span.CodeMirror-matchingbracket {color: #0f0;}
div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;}
.CodeMirror-matchingtag { background: rgba(255, 150, 0, .3); }
.CodeMirror-activeline-background {background: #e8f2ff;}
/* STOP */
/* The rest of this file contains styles related to the mechanics of
the editor. You probably shouldn't touch them. */
.CodeMirror {
position: relative;
overflow: hidden;
background: white;
}
.CodeMirror-scroll {
overflow: scroll !important; /* Things will break if this is overridden */
/* 30px is the magic margin used to hide the element's real scrollbars */
/* See overflow: hidden in .CodeMirror */
margin-bottom: -30px; margin-right: -30px;
padding-bottom: 30px;
height: 100%;
outline: none; /* Prevent dragging from highlighting the element */
position: relative;
}
.CodeMirror-sizer {
position: relative;
border-right: 30px solid transparent;
}
/* The fake, visible scrollbars. Used to force redraw during scrolling
before actual scrolling happens, thus preventing shaking and
flickering artifacts. */
.CodeMirror-vscrollbar, .CodeMirror-hscrollbar, .CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler {
position: absolute;
z-index: 6;
display: none;
}
.CodeMirror-vscrollbar {
right: 0; top: 0;
overflow-x: hidden;
overflow-y: scroll;
}
.CodeMirror-hscrollbar {
bottom: 0; left: 0;
overflow-y: hidden;
overflow-x: scroll;
}
.CodeMirror-scrollbar-filler {
right: 0; bottom: 0;
}
.CodeMirror-gutter-filler {
left: 0; bottom: 0;
}
.CodeMirror-gutters {
position: absolute; left: 0; top: 0;
z-index: 3;
}
.CodeMirror-gutter {
white-space: normal;
height: 100%;
display: inline-block;
margin-bottom: -30px;
/* Hack to make IE7 behave */
*zoom:1;
*display:inline;
}
.CodeMirror-gutter-wrapper {
position: absolute;
z-index: 4;
background: none !important;
border: none !important;
}
.CodeMirror-gutter-background {
position: absolute;
top: 0; bottom: 0;
z-index: 4;
}
.CodeMirror-gutter-elt {
position: absolute;
cursor: default;
z-index: 4;
}
.CodeMirror-gutter-wrapper {
-webkit-user-select: none;
-moz-user-select: none;
user-select: none;
}
.CodeMirror-lines {
cursor: text;
min-height: 1px; /* prevents collapsing before first draw */
}
.CodeMirror pre {
/* Reset some styles that the rest of the page might have set */
-moz-border-radius: 0; -webkit-border-radius: 0; border-radius: 0;
border-width: 0;
background: transparent;
font-family: inherit;
font-size: inherit;
margin: 0;
white-space: pre;
word-wrap: normal;
line-height: inherit;
color: inherit;
z-index: 2;
position: relative;
overflow: visible;
-webkit-tap-highlight-color: transparent;
}
.CodeMirror-wrap pre {
word-wrap: break-word;
white-space: pre-wrap;
word-break: normal;
}
.CodeMirror-linebackground {
position: absolute;
left: 0; right: 0; top: 0; bottom: 0;
z-index: 0;
}
.CodeMirror-linewidget {
position: relative;
z-index: 2;
overflow: auto;
}
.CodeMirror-widget {}
.CodeMirror-code {
outline: none;
}
/* Force content-box sizing for the elements where we expect it */
.CodeMirror-scroll,
.CodeMirror-sizer,
.CodeMirror-gutter,
.CodeMirror-gutters,
.CodeMirror-linenumber {
-moz-box-sizing: content-box;
box-sizing: content-box;
}
.CodeMirror-measure {
position: absolute;
width: 100%;
height: 0;
overflow: hidden;
visibility: hidden;
}
.CodeMirror-cursor { position: absolute; }
.CodeMirror-measure pre { position: static; }
div.CodeMirror-cursors {
visibility: hidden;
position: relative;
z-index: 3;
}
div.CodeMirror-dragcursors {
visibility: visible;
}
.CodeMirror-focused div.CodeMirror-cursors {
visibility: visible;
}
.CodeMirror-selected { background: #d9d9d9; }
.CodeMirror-focused .CodeMirror-selected { background: #d7d4f0; }
.CodeMirror-crosshair { cursor: crosshair; }
.CodeMirror-line::selection, .CodeMirror-line > span::selection, .CodeMirror-line > span > span::selection { background: #d7d4f0; }
.CodeMirror-line::-moz-selection, .CodeMirror-line > span::-moz-selection, .CodeMirror-line > span > span::-moz-selection { background: #d7d4f0; }
.cm-searching {
background: #ffa;
background: rgba(255, 255, 0, .4);
}
/* IE7 hack to prevent it from returning funny offsetTops on the spans */
.CodeMirror span { *vertical-align: text-bottom; }
/* Used to force a border model for a node */
.cm-force-border { padding-right: .1px; }
@media print {
/* Hide the cursor when printing */
.CodeMirror div.CodeMirror-cursors {
visibility: hidden;
}
}
/* See issue #2901 */
.cm-tab-wrap-hack:after { content: ''; }
/* Help users use markselection to safely style text background */
span.CodeMirror-selectedtext { background: none; }
/* Based on Sublime Text's Monokai theme */
.cm-s-monokai.CodeMirror { background: #272822; color: #f8f8f2; }
.cm-s-monokai div.CodeMirror-selected { background: #49483E; }
.cm-s-monokai .CodeMirror-line::selection, .cm-s-monokai .CodeMirror-line > span::selection, .cm-s-monokai .CodeMirror-line > span > span::selection { background: rgba(73, 72, 62, .99); }
.cm-s-monokai .CodeMirror-line::-moz-selection, .cm-s-monokai .CodeMirror-line > span::-moz-selection, .cm-s-monokai .CodeMirror-line > span > span::-moz-selection { background: rgba(73, 72, 62, .99); }
.cm-s-monokai .CodeMirror-gutters { background: #272822; border-right: 0px; }
.cm-s-monokai .CodeMirror-guttermarker { color: white; }
.cm-s-monokai .CodeMirror-guttermarker-subtle { color: #d0d0d0; }
.cm-s-monokai .CodeMirror-linenumber { color: #d0d0d0; }
.cm-s-monokai .CodeMirror-cursor { border-left: 1px solid #f8f8f0; }
.cm-s-monokai span.cm-comment { color: #75715e; }
.cm-s-monokai span.cm-atom { color: #ae81ff; }
.cm-s-monokai span.cm-number { color: #ae81ff; }
.cm-s-monokai span.cm-property, .cm-s-monokai span.cm-attribute { color: #a6e22e; }
.cm-s-monokai span.cm-keyword { color: #f92672; }
.cm-s-monokai span.cm-builtin { color: #66d9ef; }
.cm-s-monokai span.cm-string { color: #e6db74; }
.cm-s-monokai span.cm-variable { color: #f8f8f2; }
.cm-s-monokai span.cm-variable-2 { color: #9effff; }
.cm-s-monokai span.cm-variable-3 { color: #66d9ef; }
.cm-s-monokai span.cm-def { color: #fd971f; }
.cm-s-monokai span.cm-bracket { color: #f8f8f2; }
.cm-s-monokai span.cm-tag { color: #f92672; }
.cm-s-monokai span.cm-header { color: #ae81ff; }
.cm-s-monokai span.cm-link { color: #ae81ff; }
.cm-s-monokai span.cm-error { background: #f92672; color: #f8f8f0; }
.cm-s-monokai .CodeMirror-activeline-background { background: #373831; }
.cm-s-monokai .CodeMirror-matchingbracket {
text-decoration: underline;
color: white !important;
}

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,6 @@
/*! jQuery UI - v1.12.0 - 2016-09-10
* http://jqueryui.com
* Includes: draggable.css, core.css, resizable.css
* Copyright jQuery Foundation and other contributors; Licensed MIT */
.ui-draggable-handle{-ms-touch-action:none;touch-action:none}.ui-helper-hidden{display:none}.ui-helper-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.ui-helper-reset{margin:0;padding:0;border:0;outline:0;line-height:1.3;text-decoration:none;font-size:100%;list-style:none}.ui-helper-clearfix:before,.ui-helper-clearfix:after{content:"";display:table;border-collapse:collapse}.ui-helper-clearfix:after{clear:both}.ui-helper-zfix{width:100%;height:100%;top:0;left:0;position:absolute;opacity:0;filter:Alpha(Opacity=0)}.ui-front{z-index:100}.ui-state-disabled{cursor:default!important;pointer-events:none}.ui-icon{display:inline-block;vertical-align:middle;margin-top:-.25em;position:relative;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat}.ui-widget-icon-block{left:50%;margin-left:-8px;display:block}.ui-widget-overlay{position:fixed;top:0;left:0;width:100%;height:100%}.ui-resizable{position:relative}.ui-resizable-handle{position:absolute;font-size:0.1px;display:block;-ms-touch-action:none;touch-action:none}.ui-resizable-disabled .ui-resizable-handle,.ui-resizable-autohide .ui-resizable-handle{display:none}.ui-resizable-n{cursor:n-resize;height:7px;width:100%;top:-5px;left:0}.ui-resizable-s{cursor:s-resize;height:7px;width:100%;bottom:-5px;left:0}.ui-resizable-e{cursor:e-resize;width:7px;right:-5px;top:0;height:100%}.ui-resizable-w{cursor:w-resize;width:7px;left:-5px;top:0;height:100%}.ui-resizable-se{cursor:se-resize;width:12px;height:12px;right:1px;bottom:1px}.ui-resizable-sw{cursor:sw-resize;width:9px;height:9px;left:-5px;bottom:-5px}.ui-resizable-nw{cursor:nw-resize;width:9px;height:9px;left:-5px;top:-5px}.ui-resizable-ne{cursor:ne-resize;width:9px;height:9px;right:-5px;top:-5px}

File diff suppressed because it is too large Load diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,130 @@
// CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: http://codemirror.net/LICENSE
(function(mod) {
if (typeof exports == "object" && typeof module == "object") // CommonJS
mod(require("../../lib/codemirror"), require("../markdown/markdown"), require("../../addon/mode/overlay"));
else if (typeof define == "function" && define.amd) // AMD
define(["../../lib/codemirror", "../markdown/markdown", "../../addon/mode/overlay"], mod);
else // Plain browser env
mod(CodeMirror);
})(function(CodeMirror) {
"use strict";
var urlRE = /^((?:(?:aaas?|about|acap|adiumxtra|af[ps]|aim|apt|attachment|aw|beshare|bitcoin|bolo|callto|cap|chrome(?:-extension)?|cid|coap|com-eventbrite-attendee|content|crid|cvs|data|dav|dict|dlna-(?:playcontainer|playsingle)|dns|doi|dtn|dvb|ed2k|facetime|feed|file|finger|fish|ftp|geo|gg|git|gizmoproject|go|gopher|gtalk|h323|hcp|https?|iax|icap|icon|im|imap|info|ipn|ipp|irc[6s]?|iris(?:\.beep|\.lwz|\.xpc|\.xpcs)?|itms|jar|javascript|jms|keyparc|lastfm|ldaps?|magnet|mailto|maps|market|message|mid|mms|ms-help|msnim|msrps?|mtqp|mumble|mupdate|mvn|news|nfs|nih?|nntp|notes|oid|opaquelocktoken|palm|paparazzi|platform|pop|pres|proxy|psyc|query|res(?:ource)?|rmi|rsync|rtmp|rtsp|secondlife|service|session|sftp|sgn|shttp|sieve|sips?|skype|sm[bs]|snmp|soap\.beeps?|soldat|spotify|ssh|steam|svn|tag|teamspeak|tel(?:net)?|tftp|things|thismessage|tip|tn3270|tv|udp|unreal|urn|ut2004|vemmi|ventrilo|view-source|webcal|wss?|wtai|wyciwyg|xcon(?:-userid)?|xfire|xmlrpc\.beeps?|xmpp|xri|ymsgr|z39\.50[rs]?):(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]|\([^\s()<>]*\))+(?:\([^\s()<>]*\)|[^\s`*!()\[\]{};:'".,<>?«»“”‘’]))/i
CodeMirror.defineMode("gfm", function(config, modeConfig) {
var codeDepth = 0;
function blankLine(state) {
state.code = false;
return null;
}
var gfmOverlay = {
startState: function() {
return {
code: false,
codeBlock: false,
ateSpace: false
};
},
copyState: function(s) {
return {
code: s.code,
codeBlock: s.codeBlock,
ateSpace: s.ateSpace
};
},
token: function(stream, state) {
state.combineTokens = null;
// Hack to prevent formatting override inside code blocks (block and inline)
if (state.codeBlock) {
if (stream.match(/^```+/)) {
state.codeBlock = false;
return null;
}
stream.skipToEnd();
return null;
}
if (stream.sol()) {
state.code = false;
}
if (stream.sol() && stream.match(/^```+/)) {
stream.skipToEnd();
state.codeBlock = true;
return null;
}
// If this block is changed, it may need to be updated in Markdown mode
if (stream.peek() === '`') {
stream.next();
var before = stream.pos;
stream.eatWhile('`');
var difference = 1 + stream.pos - before;
if (!state.code) {
codeDepth = difference;
state.code = true;
} else {
if (difference === codeDepth) { // Must be exact
state.code = false;
}
}
return null;
} else if (state.code) {
stream.next();
return null;
}
// Check if space. If so, links can be formatted later on
if (stream.eatSpace()) {
state.ateSpace = true;
return null;
}
if (stream.sol() || state.ateSpace) {
state.ateSpace = false;
if (modeConfig.gitHubSpice !== false) {
if(stream.match(/^(?:[a-zA-Z0-9\-_]+\/)?(?:[a-zA-Z0-9\-_]+@)?(?:[a-f0-9]{7,40}\b)/)) {
// User/Project@SHA
// User@SHA
// SHA
state.combineTokens = true;
return "link";
} else if (stream.match(/^(?:[a-zA-Z0-9\-_]+\/)?(?:[a-zA-Z0-9\-_]+)?#[0-9]+\b/)) {
// User/Project#Num
// User#Num
// #Num
state.combineTokens = true;
return "link";
}
}
}
if (stream.match(urlRE) &&
stream.string.slice(stream.start - 2, stream.start) != "](" &&
(stream.start == 0 || /\W/.test(stream.string.charAt(stream.start - 1)))) {
// URLs
// Taken from http://daringfireball.net/2010/07/improved_regex_for_matching_urls
// And then (issue #1160) simplified to make it not crash the Chrome Regexp engine
// And then limited url schemes to the CommonMark list, so foo:bar isn't matched as a URL
state.combineTokens = true;
return "link";
}
stream.next();
return null;
},
blankLine: blankLine
};
var markdownConfig = {
underscoresBreakWords: false,
taskLists: true,
fencedCodeBlocks: '```',
strikethrough: true
};
for (var attr in modeConfig) {
markdownConfig[attr] = modeConfig[attr];
}
markdownConfig.name = "markdown";
return CodeMirror.overlayMode(CodeMirror.getMode(config, markdownConfig), gfmOverlay);
}, "markdown");
CodeMirror.defineMIME("text/x-gfm", "gfm");
});

View file

@ -0,0 +1,803 @@
// CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: http://codemirror.net/LICENSE
(function(mod) {
if (typeof exports == "object" && typeof module == "object") // CommonJS
mod(require("../../lib/codemirror"), require("../xml/xml"), require("../meta"));
else if (typeof define == "function" && define.amd) // AMD
define(["../../lib/codemirror", "../xml/xml", "../meta"], mod);
else // Plain browser env
mod(CodeMirror);
})(function(CodeMirror) {
"use strict";
CodeMirror.defineMode("markdown", function(cmCfg, modeCfg) {
var htmlFound = CodeMirror.modes.hasOwnProperty("xml");
var htmlMode = CodeMirror.getMode(cmCfg, htmlFound ? {name: "xml", htmlMode: true} : "text/plain");
function getMode(name) {
if (CodeMirror.findModeByName) {
var found = CodeMirror.findModeByName(name);
if (found) name = found.mime || found.mimes[0];
}
var mode = CodeMirror.getMode(cmCfg, name);
return mode.name == "null" ? null : mode;
}
// Should characters that affect highlighting be highlighted separate?
// Does not include characters that will be output (such as `1.` and `-` for lists)
if (modeCfg.highlightFormatting === undefined)
modeCfg.highlightFormatting = false;
// Maximum number of nested blockquotes. Set to 0 for infinite nesting.
// Excess `>` will emit `error` token.
if (modeCfg.maxBlockquoteDepth === undefined)
modeCfg.maxBlockquoteDepth = 0;
// Should underscores in words open/close em/strong?
if (modeCfg.underscoresBreakWords === undefined)
modeCfg.underscoresBreakWords = true;
// Use `fencedCodeBlocks` to configure fenced code blocks. false to
// disable, string to specify a precise regexp that the fence should
// match, and true to allow three or more backticks or tildes (as
// per CommonMark).
// Turn on task lists? ("- [ ] " and "- [x] ")
if (modeCfg.taskLists === undefined) modeCfg.taskLists = false;
// Turn on strikethrough syntax
if (modeCfg.strikethrough === undefined)
modeCfg.strikethrough = false;
// Allow token types to be overridden by user-provided token types.
if (modeCfg.tokenTypeOverrides === undefined)
modeCfg.tokenTypeOverrides = {};
var codeDepth = 0;
var tokenTypes = {
header: "header",
code: "comment",
quote: "quote",
list1: "variable-2",
list2: "variable-3",
list3: "keyword",
hr: "hr",
image: "tag",
formatting: "formatting",
linkInline: "link",
linkEmail: "link",
linkText: "link",
linkHref: "string",
em: "em",
strong: "strong",
strikethrough: "strikethrough"
};
for (var tokenType in tokenTypes) {
if (tokenTypes.hasOwnProperty(tokenType) && modeCfg.tokenTypeOverrides[tokenType]) {
tokenTypes[tokenType] = modeCfg.tokenTypeOverrides[tokenType];
}
}
var hrRE = /^([*\-_])(?:\s*\1){2,}\s*$/
, ulRE = /^[*\-+]\s+/
, olRE = /^[0-9]+([.)])\s+/
, taskListRE = /^\[(x| )\](?=\s)/ // Must follow ulRE or olRE
, atxHeaderRE = modeCfg.allowAtxHeaderWithoutSpace ? /^(#+)/ : /^(#+)(?: |$)/
, setextHeaderRE = /^ *(?:\={1,}|-{1,})\s*$/
, textRE = /^[^#!\[\]*_\\<>` "'(~]+/
, fencedCodeRE = new RegExp("^(" + (modeCfg.fencedCodeBlocks === true ? "~~~+|```+" : modeCfg.fencedCodeBlocks) +
")[ \\t]*([\\w+#]*)");
function switchInline(stream, state, f) {
state.f = state.inline = f;
return f(stream, state);
}
function switchBlock(stream, state, f) {
state.f = state.block = f;
return f(stream, state);
}
function lineIsEmpty(line) {
return !line || !/\S/.test(line.string)
}
// Blocks
function blankLine(state) {
// Reset linkTitle state
state.linkTitle = false;
// Reset EM state
state.em = false;
// Reset STRONG state
state.strong = false;
// Reset strikethrough state
state.strikethrough = false;
// Reset state.quote
state.quote = 0;
// Reset state.indentedCode
state.indentedCode = false;
if (!htmlFound && state.f == htmlBlock) {
state.f = inlineNormal;
state.block = blockNormal;
}
// Reset state.trailingSpace
state.trailingSpace = 0;
state.trailingSpaceNewLine = false;
// Mark this line as blank
state.prevLine = state.thisLine
state.thisLine = null
return null;
}
function blockNormal(stream, state) {
var sol = stream.sol();
var prevLineIsList = state.list !== false,
prevLineIsIndentedCode = state.indentedCode;
state.indentedCode = false;
if (prevLineIsList) {
if (state.indentationDiff >= 0) { // Continued list
if (state.indentationDiff < 4) { // Only adjust indentation if *not* a code block
state.indentation -= state.indentationDiff;
}
state.list = null;
} else if (state.indentation > 0) {
state.list = null;
state.listDepth = Math.floor(state.indentation / 4);
} else { // No longer a list
state.list = false;
state.listDepth = 0;
}
}
var match = null;
if (state.indentationDiff >= 4) {
stream.skipToEnd();
if (prevLineIsIndentedCode || lineIsEmpty(state.prevLine)) {
state.indentation -= 4;
state.indentedCode = true;
return tokenTypes.code;
} else {
return null;
}
} else if (stream.eatSpace()) {
return null;
} else if ((match = stream.match(atxHeaderRE)) && match[1].length <= 6) {
state.header = match[1].length;
if (modeCfg.highlightFormatting) state.formatting = "header";
state.f = state.inline;
return getType(state);
} else if (!lineIsEmpty(state.prevLine) && !state.quote && !prevLineIsList &&
!prevLineIsIndentedCode && (match = stream.match(setextHeaderRE))) {
state.header = match[0].charAt(0) == '=' ? 1 : 2;
if (modeCfg.highlightFormatting) state.formatting = "header";
state.f = state.inline;
return getType(state);
} else if (stream.eat('>')) {
state.quote = sol ? 1 : state.quote + 1;
if (modeCfg.highlightFormatting) state.formatting = "quote";
stream.eatSpace();
return getType(state);
} else if (stream.peek() === '[') {
return switchInline(stream, state, footnoteLink);
} else if (stream.match(hrRE, true)) {
state.hr = true;
return tokenTypes.hr;
} else if ((lineIsEmpty(state.prevLine) || prevLineIsList) && (stream.match(ulRE, false) || stream.match(olRE, false))) {
var listType = null;
if (stream.match(ulRE, true)) {
listType = 'ul';
} else {
stream.match(olRE, true);
listType = 'ol';
}
state.indentation = stream.column() + stream.current().length;
state.list = true;
state.listDepth++;
if (modeCfg.taskLists && stream.match(taskListRE, false)) {
state.taskList = true;
}
state.f = state.inline;
if (modeCfg.highlightFormatting) state.formatting = ["list", "list-" + listType];
return getType(state);
} else if (modeCfg.fencedCodeBlocks && (match = stream.match(fencedCodeRE, true))) {
state.fencedChars = match[1]
// try switching mode
state.localMode = getMode(match[2]);
if (state.localMode) state.localState = state.localMode.startState();
state.f = state.block = local;
if (modeCfg.highlightFormatting) state.formatting = "code-block";
state.code = true;
return getType(state);
}
return switchInline(stream, state, state.inline);
}
function htmlBlock(stream, state) {
var style = htmlMode.token(stream, state.htmlState);
if ((htmlFound && state.htmlState.tagStart === null &&
(!state.htmlState.context && state.htmlState.tokenize.isInText)) ||
(state.md_inside && stream.current().indexOf(">") > -1)) {
state.f = inlineNormal;
state.block = blockNormal;
state.htmlState = null;
}
return style;
}
function local(stream, state) {
if (state.fencedChars && stream.match(state.fencedChars, false)) {
state.localMode = state.localState = null;
state.f = state.block = leavingLocal;
return null;
} else if (state.localMode) {
return state.localMode.token(stream, state.localState);
} else {
stream.skipToEnd();
return tokenTypes.code;
}
}
function leavingLocal(stream, state) {
stream.match(state.fencedChars);
state.block = blockNormal;
state.f = inlineNormal;
state.fencedChars = null;
if (modeCfg.highlightFormatting) state.formatting = "code-block";
state.code = true;
var returnType = getType(state);
state.code = false;
return returnType;
}
// Inline
function getType(state) {
var styles = [];
if (state.formatting) {
styles.push(tokenTypes.formatting);
if (typeof state.formatting === "string") state.formatting = [state.formatting];
for (var i = 0; i < state.formatting.length; i++) {
styles.push(tokenTypes.formatting + "-" + state.formatting[i]);
if (state.formatting[i] === "header") {
styles.push(tokenTypes.formatting + "-" + state.formatting[i] + "-" + state.header);
}
// Add `formatting-quote` and `formatting-quote-#` for blockquotes
// Add `error` instead if the maximum blockquote nesting depth is passed
if (state.formatting[i] === "quote") {
if (!modeCfg.maxBlockquoteDepth || modeCfg.maxBlockquoteDepth >= state.quote) {
styles.push(tokenTypes.formatting + "-" + state.formatting[i] + "-" + state.quote);
} else {
styles.push("error");
}
}
}
}
if (state.taskOpen) {
styles.push("meta");
return styles.length ? styles.join(' ') : null;
}
if (state.taskClosed) {
styles.push("property");
return styles.length ? styles.join(' ') : null;
}
if (state.linkHref) {
styles.push(tokenTypes.linkHref, "url");
} else { // Only apply inline styles to non-url text
if (state.strong) { styles.push(tokenTypes.strong); }
if (state.em) { styles.push(tokenTypes.em); }
if (state.strikethrough) { styles.push(tokenTypes.strikethrough); }
if (state.linkText) { styles.push(tokenTypes.linkText); }
if (state.code) { styles.push(tokenTypes.code); }
}
if (state.header) { styles.push(tokenTypes.header, tokenTypes.header + "-" + state.header); }
if (state.quote) {
styles.push(tokenTypes.quote);
// Add `quote-#` where the maximum for `#` is modeCfg.maxBlockquoteDepth
if (!modeCfg.maxBlockquoteDepth || modeCfg.maxBlockquoteDepth >= state.quote) {
styles.push(tokenTypes.quote + "-" + state.quote);
} else {
styles.push(tokenTypes.quote + "-" + modeCfg.maxBlockquoteDepth);
}
}
if (state.list !== false) {
var listMod = (state.listDepth - 1) % 3;
if (!listMod) {
styles.push(tokenTypes.list1);
} else if (listMod === 1) {
styles.push(tokenTypes.list2);
} else {
styles.push(tokenTypes.list3);
}
}
if (state.trailingSpaceNewLine) {
styles.push("trailing-space-new-line");
} else if (state.trailingSpace) {
styles.push("trailing-space-" + (state.trailingSpace % 2 ? "a" : "b"));
}
return styles.length ? styles.join(' ') : null;
}
function handleText(stream, state) {
if (stream.match(textRE, true)) {
return getType(state);
}
return undefined;
}
function inlineNormal(stream, state) {
var style = state.text(stream, state);
if (typeof style !== 'undefined')
return style;
if (state.list) { // List marker (*, +, -, 1., etc)
state.list = null;
return getType(state);
}
if (state.taskList) {
var taskOpen = stream.match(taskListRE, true)[1] !== "x";
if (taskOpen) state.taskOpen = true;
else state.taskClosed = true;
if (modeCfg.highlightFormatting) state.formatting = "task";
state.taskList = false;
return getType(state);
}
state.taskOpen = false;
state.taskClosed = false;
if (state.header && stream.match(/^#+$/, true)) {
if (modeCfg.highlightFormatting) state.formatting = "header";
return getType(state);
}
// Get sol() value now, before character is consumed
var sol = stream.sol();
var ch = stream.next();
if (ch === '\\') {
stream.next();
if (modeCfg.highlightFormatting) {
var type = getType(state);
var formattingEscape = tokenTypes.formatting + "-escape";
return type ? type + " " + formattingEscape : formattingEscape;
}
}
// Matches link titles present on next line
if (state.linkTitle) {
state.linkTitle = false;
var matchCh = ch;
if (ch === '(') {
matchCh = ')';
}
matchCh = (matchCh+'').replace(/([.?*+^$[\]\\(){}|-])/g, "\\$1");
var regex = '^\\s*(?:[^' + matchCh + '\\\\]+|\\\\\\\\|\\\\.)' + matchCh;
if (stream.match(new RegExp(regex), true)) {
return tokenTypes.linkHref;
}
}
// If this block is changed, it may need to be updated in GFM mode
if (ch === '`') {
var previousFormatting = state.formatting;
if (modeCfg.highlightFormatting) state.formatting = "code";
var t = getType(state);
var before = stream.pos;
stream.eatWhile('`');
var difference = 1 + stream.pos - before;
if (!state.code) {
codeDepth = difference;
state.code = true;
return getType(state);
} else {
if (difference === codeDepth) { // Must be exact
state.code = false;
return t;
}
state.formatting = previousFormatting;
return getType(state);
}
} else if (state.code) {
return getType(state);
}
if (ch === '!' && stream.match(/\[[^\]]*\] ?(?:\(|\[)/, false)) {
stream.match(/\[[^\]]*\]/);
state.inline = state.f = linkHref;
return tokenTypes.image;
}
if (ch === '[' && stream.match(/.*\](\(.*\)| ?\[.*\])/, false)) {
state.linkText = true;
if (modeCfg.highlightFormatting) state.formatting = "link";
return getType(state);
}
if (ch === ']' && state.linkText && stream.match(/\(.*\)| ?\[.*\]/, false)) {
if (modeCfg.highlightFormatting) state.formatting = "link";
var type = getType(state);
state.linkText = false;
state.inline = state.f = linkHref;
return type;
}
if (ch === '<' && stream.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/, false)) {
state.f = state.inline = linkInline;
if (modeCfg.highlightFormatting) state.formatting = "link";
var type = getType(state);
if (type){
type += " ";
} else {
type = "";
}
return type + tokenTypes.linkInline;
}
if (ch === '<' && stream.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/, false)) {
state.f = state.inline = linkInline;
if (modeCfg.highlightFormatting) state.formatting = "link";
var type = getType(state);
if (type){
type += " ";
} else {
type = "";
}
return type + tokenTypes.linkEmail;
}
if (ch === '<' && stream.match(/^(!--|\w)/, false)) {
var end = stream.string.indexOf(">", stream.pos);
if (end != -1) {
var atts = stream.string.substring(stream.start, end);
if (/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(atts)) state.md_inside = true;
}
stream.backUp(1);
state.htmlState = CodeMirror.startState(htmlMode);
return switchBlock(stream, state, htmlBlock);
}
if (ch === '<' && stream.match(/^\/\w*?>/)) {
state.md_inside = false;
return "tag";
}
var ignoreUnderscore = false;
if (!modeCfg.underscoresBreakWords) {
if (ch === '_' && stream.peek() !== '_' && stream.match(/(\w)/, false)) {
var prevPos = stream.pos - 2;
if (prevPos >= 0) {
var prevCh = stream.string.charAt(prevPos);
if (prevCh !== '_' && prevCh.match(/(\w)/, false)) {
ignoreUnderscore = true;
}
}
}
}
if (ch === '*' || (ch === '_' && !ignoreUnderscore)) {
if (sol && stream.peek() === ' ') {
// Do nothing, surrounded by newline and space
} else if (state.strong === ch && stream.eat(ch)) { // Remove STRONG
if (modeCfg.highlightFormatting) state.formatting = "strong";
var t = getType(state);
state.strong = false;
return t;
} else if (!state.strong && stream.eat(ch)) { // Add STRONG
state.strong = ch;
if (modeCfg.highlightFormatting) state.formatting = "strong";
return getType(state);
} else if (state.em === ch) { // Remove EM
if (modeCfg.highlightFormatting) state.formatting = "em";
var t = getType(state);
state.em = false;
return t;
} else if (!state.em) { // Add EM
state.em = ch;
if (modeCfg.highlightFormatting) state.formatting = "em";
return getType(state);
}
} else if (ch === ' ') {
if (stream.eat('*') || stream.eat('_')) { // Probably surrounded by spaces
if (stream.peek() === ' ') { // Surrounded by spaces, ignore
return getType(state);
} else { // Not surrounded by spaces, back up pointer
stream.backUp(1);
}
}
}
if (modeCfg.strikethrough) {
if (ch === '~' && stream.eatWhile(ch)) {
if (state.strikethrough) {// Remove strikethrough
if (modeCfg.highlightFormatting) state.formatting = "strikethrough";
var t = getType(state);
state.strikethrough = false;
return t;
} else if (stream.match(/^[^\s]/, false)) {// Add strikethrough
state.strikethrough = true;
if (modeCfg.highlightFormatting) state.formatting = "strikethrough";
return getType(state);
}
} else if (ch === ' ') {
if (stream.match(/^~~/, true)) { // Probably surrounded by space
if (stream.peek() === ' ') { // Surrounded by spaces, ignore
return getType(state);
} else { // Not surrounded by spaces, back up pointer
stream.backUp(2);
}
}
}
}
if (ch === ' ') {
if (stream.match(/ +$/, false)) {
state.trailingSpace++;
} else if (state.trailingSpace) {
state.trailingSpaceNewLine = true;
}
}
return getType(state);
}
function linkInline(stream, state) {
var ch = stream.next();
if (ch === ">") {
state.f = state.inline = inlineNormal;
if (modeCfg.highlightFormatting) state.formatting = "link";
var type = getType(state);
if (type){
type += " ";
} else {
type = "";
}
return type + tokenTypes.linkInline;
}
stream.match(/^[^>]+/, true);
return tokenTypes.linkInline;
}
function linkHref(stream, state) {
// Check if space, and return NULL if so (to avoid marking the space)
if(stream.eatSpace()){
return null;
}
var ch = stream.next();
if (ch === '(' || ch === '[') {
state.f = state.inline = getLinkHrefInside(ch === "(" ? ")" : "]");
if (modeCfg.highlightFormatting) state.formatting = "link-string";
state.linkHref = true;
return getType(state);
}
return 'error';
}
function getLinkHrefInside(endChar) {
return function(stream, state) {
var ch = stream.next();
if (ch === endChar) {
state.f = state.inline = inlineNormal;
if (modeCfg.highlightFormatting) state.formatting = "link-string";
var returnState = getType(state);
state.linkHref = false;
return returnState;
}
if (stream.match(inlineRE(endChar), true)) {
stream.backUp(1);
}
state.linkHref = true;
return getType(state);
};
}
function footnoteLink(stream, state) {
if (stream.match(/^([^\]\\]|\\.)*\]:/, false)) {
state.f = footnoteLinkInside;
stream.next(); // Consume [
if (modeCfg.highlightFormatting) state.formatting = "link";
state.linkText = true;
return getType(state);
}
return switchInline(stream, state, inlineNormal);
}
function footnoteLinkInside(stream, state) {
if (stream.match(/^\]:/, true)) {
state.f = state.inline = footnoteUrl;
if (modeCfg.highlightFormatting) state.formatting = "link";
var returnType = getType(state);
state.linkText = false;
return returnType;
}
stream.match(/^([^\]\\]|\\.)+/, true);
return tokenTypes.linkText;
}
function footnoteUrl(stream, state) {
// Check if space, and return NULL if so (to avoid marking the space)
if(stream.eatSpace()){
return null;
}
// Match URL
stream.match(/^[^\s]+/, true);
// Check for link title
if (stream.peek() === undefined) { // End of line, set flag to check next line
state.linkTitle = true;
} else { // More content on line, check if link title
stream.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/, true);
}
state.f = state.inline = inlineNormal;
return tokenTypes.linkHref + " url";
}
var savedInlineRE = [];
function inlineRE(endChar) {
if (!savedInlineRE[endChar]) {
// Escape endChar for RegExp (taken from http://stackoverflow.com/a/494122/526741)
endChar = (endChar+'').replace(/([.?*+^$[\]\\(){}|-])/g, "\\$1");
// Match any non-endChar, escaped character, as well as the closing
// endChar.
savedInlineRE[endChar] = new RegExp('^(?:[^\\\\]|\\\\.)*?(' + endChar + ')');
}
return savedInlineRE[endChar];
}
var mode = {
startState: function() {
return {
f: blockNormal,
prevLine: null,
thisLine: null,
block: blockNormal,
htmlState: null,
indentation: 0,
inline: inlineNormal,
text: handleText,
formatting: false,
linkText: false,
linkHref: false,
linkTitle: false,
em: false,
strong: false,
header: 0,
hr: false,
taskList: false,
list: false,
listDepth: 0,
quote: 0,
trailingSpace: 0,
trailingSpaceNewLine: false,
strikethrough: false,
fencedChars: null
};
},
copyState: function(s) {
return {
f: s.f,
prevLine: s.prevLine,
thisLine: s.thisLine,
block: s.block,
htmlState: s.htmlState && CodeMirror.copyState(htmlMode, s.htmlState),
indentation: s.indentation,
localMode: s.localMode,
localState: s.localMode ? CodeMirror.copyState(s.localMode, s.localState) : null,
inline: s.inline,
text: s.text,
formatting: false,
linkTitle: s.linkTitle,
code: s.code,
em: s.em,
strong: s.strong,
strikethrough: s.strikethrough,
header: s.header,
hr: s.hr,
taskList: s.taskList,
list: s.list,
listDepth: s.listDepth,
quote: s.quote,
indentedCode: s.indentedCode,
trailingSpace: s.trailingSpace,
trailingSpaceNewLine: s.trailingSpaceNewLine,
md_inside: s.md_inside,
fencedChars: s.fencedChars
};
},
token: function(stream, state) {
// Reset state.formatting
state.formatting = false;
if (stream != state.thisLine) {
var forceBlankLine = state.header || state.hr;
// Reset state.header and state.hr
state.header = 0;
state.hr = false;
if (stream.match(/^\s*$/, true) || forceBlankLine) {
blankLine(state);
if (!forceBlankLine) return null
state.prevLine = null
}
state.prevLine = state.thisLine
state.thisLine = stream
// Reset state.taskList
state.taskList = false;
// Reset state.trailingSpace
state.trailingSpace = 0;
state.trailingSpaceNewLine = false;
state.f = state.block;
var indentation = stream.match(/^\s*/, true)[0].replace(/\t/g, ' ').length;
var difference = Math.floor((indentation - state.indentation) / 4) * 4;
if (difference > 4) difference = 4;
var adjustedIndentation = state.indentation + difference;
state.indentationDiff = adjustedIndentation - state.indentation;
state.indentation = adjustedIndentation;
if (indentation > 0) return null;
}
return state.f(stream, state);
},
innerMode: function(state) {
if (state.block == htmlBlock) return {state: state.htmlState, mode: htmlMode};
if (state.localState) return {state: state.localState, mode: state.localMode};
return {state: state, mode: mode};
},
blankLine: blankLine,
getType: getType,
fold: "markdown"
};
return mode;
}, "xml");
CodeMirror.defineMIME("text/x-markdown", "markdown");
});

View file

@ -0,0 +1,85 @@
// CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: http://codemirror.net/LICENSE
// Utility function that allows modes to be combined. The mode given
// as the base argument takes care of most of the normal mode
// functionality, but a second (typically simple) mode is used, which
// can override the style of text. Both modes get to parse all of the
// text, but when both assign a non-null style to a piece of code, the
// overlay wins, unless the combine argument was true and not overridden,
// or state.overlay.combineTokens was true, in which case the styles are
// combined.
(function(mod) {
if (typeof exports == "object" && typeof module == "object") // CommonJS
mod(require("../../lib/codemirror"));
else if (typeof define == "function" && define.amd) // AMD
define(["../../lib/codemirror"], mod);
else // Plain browser env
mod(CodeMirror);
})(function(CodeMirror) {
"use strict";
CodeMirror.overlayMode = function(base, overlay, combine) {
return {
startState: function() {
return {
base: CodeMirror.startState(base),
overlay: CodeMirror.startState(overlay),
basePos: 0, baseCur: null,
overlayPos: 0, overlayCur: null,
streamSeen: null
};
},
copyState: function(state) {
return {
base: CodeMirror.copyState(base, state.base),
overlay: CodeMirror.copyState(overlay, state.overlay),
basePos: state.basePos, baseCur: null,
overlayPos: state.overlayPos, overlayCur: null
};
},
token: function(stream, state) {
if (stream != state.streamSeen ||
Math.min(state.basePos, state.overlayPos) < stream.start) {
state.streamSeen = stream;
state.basePos = state.overlayPos = stream.start;
}
if (stream.start == state.basePos) {
state.baseCur = base.token(stream, state.base);
state.basePos = stream.pos;
}
if (stream.start == state.overlayPos) {
stream.pos = stream.start;
state.overlayCur = overlay.token(stream, state.overlay);
state.overlayPos = stream.pos;
}
stream.pos = Math.min(state.basePos, state.overlayPos);
// state.overlay.combineTokens always takes precedence over combine,
// unless set to null
if (state.overlayCur == null) return state.baseCur;
else if (state.baseCur != null &&
state.overlay.combineTokens ||
combine && state.overlay.combineTokens == null)
return state.baseCur + " " + state.overlayCur;
else return state.overlayCur;
},
indent: base.indent && function(state, textAfter) {
return base.indent(state.base, textAfter);
},
electricChars: base.electricChars,
innerMode: function(state) { return {state: state.base, mode: base}; },
blankLine: function(state) {
if (base.blankLine) base.blankLine(state.base);
if (overlay.blankLine) overlay.blankLine(state.overlay);
}
};
};
});

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load diff

251
data/core.telegram.org.html Normal file
View file

@ -0,0 +1,251 @@
<!DOCTYPE html>
<html class="">
<head>
<meta charset="utf-8">
<title>Telegram APIs</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="We offer two kinds of APIs for developers. The Bot API allows you to easily create programs that use Telegram messages for…">
<meta property="og:title" content="Telegram APIs">
<meta property="og:image" content="df8a0f9162ddfc1daf">
<meta property="og:description" content="We offer two kinds of APIs for developers. The Bot API allows you to easily create programs that use Telegram messages for…">
<link rel="shortcut icon" href="/favicon.ico?4" type="image/x-icon" />
<link href="/css/bootstrap.min.css?3" rel="stylesheet">
<link href="/css/telegram.css?212" rel="stylesheet" media="screen">
<style>
</style>
</head>
<body class="preload">
<div class="dev_page_wrap">
<div class="dev_page_head navbar navbar-static-top navbar-tg">
<div class="navbar-inner">
<div class="container clearfix">
<ul class="nav navbar-nav navbar-right hidden-xs"><li class="navbar-twitter"><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)"><i class="icon icon-twitter"></i><span> Twitter</span></a></li></ul>
<ul class="nav navbar-nav">
<li><a href="//telegram.org/">Home</a></li>
<li class="hidden-xs"><a href="//telegram.org/faq">FAQ</a></li>
<li class="hidden-xs"><a href="//telegram.org/apps">Apps</a></li>
<li class="active"><a href="/api">API</a></li>
<li class=""><a href="/mtproto">Protocol</a></li>
<li class=""><a href="/schema">Schema</a></li>
</ul>
</div>
</div>
</div>
<div class="container clearfix">
<div class="dev_page">
<div id="dev_page_content_wrap" class=" ">
<div class="dev_page_bread_crumbs"></div>
<h1 id="dev_page_title">Telegram APIs</h1>
<div id="dev_page_content"><p>We offer two kinds of APIs for developers. The <a href="#bot-api"><strong>Bot API</strong></a> allows you to easily create programs that use Telegram messages for an interface. The <a href="#tdlib-build-your-own-telegram"><strong>Telegram API and TDLib</strong></a> allow you to build your own customized Telegram clients. You are welcome to use both APIs free of charge.</p>
<p>You can also add <a href="/widgets"><strong>Telegram Widgets</strong></a> to your website.</p>
<p>Designers are welcome to create <a href="/animated_stickers"><strong>Animated Stickers</strong></a> or <a href="/themes"><strong>Custom Themes</strong></a> for Telegram.</p>
<hr>
<h3><a class="anchor" href="#bot-api" id="bot-api" name="bot-api"><i class="anchor-icon"></i></a>Bot API</h3>
<div>
<a href="/file/811140327/1/zlN4goPTupk/9ff2f2f01c4bd1b013" target="_blank"><img src="/file/811140934/1/tbDSLHSaijc/fdcc7b6d5fb3354adf" title="The Botfather. Click for hi-res picture" style="max-width: 200px;float:right"></a>
</div>
<p>This API allows you to connect bots to our system. <a href="/bots"><strong>Telegram Bots</strong></a> are special accounts that do not require an additional phone number to set up. These accounts serve as an interface for code running somewhere on your server.</p>
<p>To use this, you don't need to know anything about how our MTProto encryption protocol works — our intermediary server will handle all encryption and communication with the Telegram API for you. You communicate with this server via a simple HTTPS-interface that offers a simplified version of the Telegram API.</p>
<blockquote>
<p><a href="/bots"><strong>Learn more about the Bot API here »</strong></a></p>
</blockquote>
<p>Bot developers can also make use of our <a href="/bots/payments"><strong>Payments API</strong></a> to accept <strong>payments</strong> from Telegram users around the world.</p>
<hr>
<h3><a class="anchor" href="#tdlib--build-your-own-telegram" id="tdlib--build-your-own-telegram" name="tdlib--build-your-own-telegram"><i class="anchor-icon"></i></a>TDLib build your own Telegram</h3>
<p>Even if you're looking for maximum customization, you don't have to create your app from scratch. Try our <a href="https://core.telegram.org/tdlib"><strong>Telegram Database Library</strong></a> (or simply TDLib), a tool for third-party developers that makes it easy to build fast, secure and feature-rich Telegram apps.</p>
<p>TDLib takes care of all <strong>network implementation</strong> details, <strong>encryption</strong> and <strong>local data storage</strong>, so that you can dedicate more time to design, responsive interfaces and beautiful animations.</p>
<p>TDLib supports all Telegram features and makes developing Telegram apps a breeze on any platform. It can be used on Android, iOS, Windows, macOS, Linux and virtually any other system. The library is open source and compatible with virtually <strong>any programming language</strong>.</p>
<blockquote>
<p><a href="https://core.telegram.org/tdlib"><strong>Learn more about TDLib here »</strong></a></p>
</blockquote>
<hr>
<h3><a class="anchor" href="#telegram-api" id="telegram-api" name="telegram-api"><i class="anchor-icon"></i></a>Telegram API</h3>
<p>This API allows you to build your own customized Telegram clients. It is 100% open for all developers who wish to create Telegram applications on our platform. Feel free to study the open <a href="https://telegram.org/apps#source-code">source code</a> of existing Telegram applications for examples of how things work here. Don't forget to <a href="/api/obtaining_api_id">register</a> your application in our system. </p>
<ul>
<li><a href="#getting-started">Getting Started</a></li>
<li><a href="#security">Security</a></li>
<li><a href="#optimization">Optimization</a></li>
<li><a href="#api-methods">API methods</a></li>
</ul>
<h3><a class="anchor" href="#getting-started" id="getting-started" name="getting-started"><i class="anchor-icon"></i></a>Getting started</h3>
<h4><a class="anchor" href="#creating-an-application" id="creating-an-application" name="creating-an-application"><i class="anchor-icon"></i></a><a href="/api/obtaining_api_id">Creating an application</a></h4>
<p>How to get your application identifier and create a new Telegram app.</p>
<h4><a class="anchor" href="#user-authorization" id="user-authorization" name="user-authorization"><i class="anchor-icon"></i></a><a href="/api/auth">User authorization</a></h4>
<p>How to register a user's phone to start using the API.</p>
<h4><a class="anchor" href="#two-factor-authentication" id="two-factor-authentication" name="two-factor-authentication"><i class="anchor-icon"></i></a><a href="/api/srp">Two-factor authentication</a></h4>
<p>How to login to a user's account if they have enabled 2FA, how to change password.</p>
<h4><a class="anchor" href="#qr-code-login" id="qr-code-login" name="qr-code-login"><i class="anchor-icon"></i></a><a href="/api/qr-login">QR code login</a></h4>
<p><a href="https://en.wikipedia.org/wiki/QR_code">QR code</a> login flow</p>
<h4><a class="anchor" href="#error-handling" id="error-handling" name="error-handling"><i class="anchor-icon"></i></a><a href="/api/errors">Error handling</a></h4>
<p>How to handle API return errors correctly.</p>
<h4><a class="anchor" href="#handling-different-data-centers" id="handling-different-data-centers" name="handling-different-data-centers"><i class="anchor-icon"></i></a><a href="/api/datacenter">Handling different data centers</a></h4>
<p>How to connect to the closest DC access point for faster interaction with the API, and things to watch out for when developing a client.</p>
<h4><a class="anchor" href="#handling-updates" id="handling-updates" name="handling-updates"><i class="anchor-icon"></i></a><a href="/api/updates">Handling updates</a></h4>
<p>How to subscribe to updates and handle them properly.</p>
<h4><a class="anchor" href="#handling-push-notifications" id="handling-push-notifications" name="handling-push-notifications"><i class="anchor-icon"></i></a><a href="/api/push-updates">Handling PUSH-notifications</a></h4>
<p>How to subscribe and handle them properly.</p>
<h4><a class="anchor" href="#channels-supergroups-and-groups" id="channels-supergroups-and-groups" name="channels-supergroups-and-groups"><i class="anchor-icon"></i></a><a href="/api/channel">Channels, supergroups and groups</a></h4>
<p>How to handle channels, supergroups, groups, and what's the difference between them.</p>
<h4><a class="anchor" href="#channel-statistics" id="channel-statistics" name="channel-statistics"><i class="anchor-icon"></i></a><a href="/api/stats">Channel statistics</a></h4>
<p>Telegram offers detailed channel statistics for channels and supergroups. </p>
<h4><a class="anchor" href="#calling-methods" id="calling-methods" name="calling-methods"><i class="anchor-icon"></i></a><a href="/api/invoking">Calling methods</a></h4>
<p>Additional options for calling methods.</p>
<h4><a class="anchor" href="#uploading-and-downloading-files" id="uploading-and-downloading-files" name="uploading-and-downloading-files"><i class="anchor-icon"></i></a><a href="/api/files">Uploading and Downloading Files</a></h4>
<p>How to transfer large data batches correctly.</p>
<h4><a class="anchor" href="#pagination" id="pagination" name="pagination"><i class="anchor-icon"></i></a><a href="/api/offsets">Pagination</a></h4>
<p>How to fetch results from large lists of objects.</p>
<h4><a class="anchor" href="#client-configuration" id="client-configuration" name="client-configuration"><i class="anchor-icon"></i></a><a href="/api/config">Client configuration</a></h4>
<p>The MTProto API has multiple client configuration parameters that can be fetched with the appropriate methods. </p>
<h3><a class="anchor" href="#security" id="security" name="security"><i class="anchor-icon"></i></a>Security</h3>
<h4><a class="anchor" href="#secret-chats-end-to-end-encryption" id="secret-chats-end-to-end-encryption" name="secret-chats-end-to-end-encryption"><i class="anchor-icon"></i></a><a href="/api/end-to-end">Secret chats, end-to-end encryption</a></h4>
<p>End-to-end-encrypted messaging.</p>
<h4><a class="anchor" href="#security-guidelines" id="security-guidelines" name="security-guidelines"><i class="anchor-icon"></i></a><a href="/mtproto/security_guidelines">Security guidelines</a></h4>
<p>Important checks required in your client application.</p>
<h4><a class="anchor" href="#perfect-forward-secrecy" id="perfect-forward-secrecy" name="perfect-forward-secrecy"><i class="anchor-icon"></i></a><a href="/api/pfs">Perfect Forward Secrecy</a></h4>
<p>Binding temporary authorization key to permanent ones.</p>
<h4><a class="anchor" href="#end-to-end-encryption-in-voice-and-video-calls" id="end-to-end-encryption-in-voice-and-video-calls" name="end-to-end-encryption-in-voice-and-video-calls"><i class="anchor-icon"></i></a><a href="https://core.telegram.org/api/end-to-end/video-calls">End-to-End Encryption in Voice and Video Calls</a></h4>
<p>End-to-end-encrypted calls.</p>
<h3><a class="anchor" href="#optimization" id="optimization" name="optimization"><i class="anchor-icon"></i></a>Optimization</h3>
<h4><a class="anchor" href="#client-optimization" id="client-optimization" name="client-optimization"><i class="anchor-icon"></i></a><a href="/api/optimisation">Client optimization</a></h4>
<p>Ways to boost API interactions.</p>
<h3><a class="anchor" href="#api-methods" id="api-methods" name="api-methods"><i class="anchor-icon"></i></a>API methods</h3>
<h4><a class="anchor" href="#available-method-list" id="available-method-list" name="available-method-list"><i class="anchor-icon"></i></a><a href="/methods">Available method list</a></h4>
<p>A list of available high-level methods.</p>
<h4><a class="anchor" href="#api-tl-schema-as-json" id="api-tl-schema-as-json" name="api-tl-schema-as-json"><i class="anchor-icon"></i></a><a href="/schema">API TL-schema</a>, <a href="/schema/json">as JSON</a></h4>
<p>Text and JSON-presentation of types and methods used in API.</p>
<h4><a class="anchor" href="#available-layer-list" id="available-layer-list" name="available-layer-list"><i class="anchor-icon"></i></a><a href="/api/layers">Available layer list</a></h4>
<p>A list of available schema versions.</p>
<h3><a class="anchor" href="#other-articles" id="other-articles" name="other-articles"><i class="anchor-icon"></i></a>Other articles</h3>
<h4><a class="anchor" href="#working-with-bots-using-the-mtproto-api" id="working-with-bots-using-the-mtproto-api" name="working-with-bots-using-the-mtproto-api"><i class="anchor-icon"></i></a><a href="/api/bots">Working with bots, using the MTProto API</a></h4>
<p>How to work with bots using the MTProto API.</p>
<h3><a class="anchor" href="#commands" id="commands" name="commands"><i class="anchor-icon"></i></a><a href="/api/bots/commands">Commands</a></h3>
<p><a href="/bots">Bots</a> offer a set of commands that can be used by users in private, or in a chat. </p>
<h3><a class="anchor" href="#buttons" id="buttons" name="buttons"><i class="anchor-icon"></i></a><a href="/api/bots/buttons">Buttons</a></h3>
<p>Users can interact with your bot via <strong>buttons</strong> or even <strong>inline buttons</strong>, straight from inline <strong>messages</strong> in <strong>any</strong> chat. </p>
<h3><a class="anchor" href="#inline-queries" id="inline-queries" name="inline-queries"><i class="anchor-icon"></i></a><a href="/api/bots/inline">Inline queries</a></h3>
<p>Users can interact with your bot via <strong>inline queries</strong>, straight from the <strong>text input field</strong> in <strong>any</strong> chat. </p>
<h3><a class="anchor" href="#games" id="games" name="games"><i class="anchor-icon"></i></a><a href="/api/bots/games">Games</a></h3>
<p>Bots can offer users HTML5 games to play solo or to compete against each other in groups and one-on-one chats; how to work with games in the MTProto API.</p>
<h3><a class="anchor" href="#search--filters" id="search--filters" name="search--filters"><i class="anchor-icon"></i></a><a href="/api/search">Search &amp; filters</a></h3>
<p>Telegram allows applying detailed message filters while looking for messages in chats.
This allows the server to filter messages based on a text query, and even on their type, and this feature is often used by graphical clients to implement features like the chat gallery, chat profile pictures and more.</p>
<h3><a class="anchor" href="#polls" id="polls" name="polls"><i class="anchor-icon"></i></a><a href="/api/poll">Polls</a></h3>
<p>Telegram allows sending polls and quizes, that can be voted on by thousands, if not milions of users in chats and channels.</p>
<h4><a class="anchor" href="#admin-banned-and-default-rights-for-channels-supergroups-and-groups" id="admin-banned-and-default-rights-for-channels-supergroups-and-groups" name="admin-banned-and-default-rights-for-channels-supergroups-and-groups"><i class="anchor-icon"></i></a><a href="/api/rights">Admin, banned and default rights for channels, supergroups and groups</a></h4>
<p>How to handle admin permissions, granular bans and global permissions in channels, groups and supergroups.</p>
<h4><a class="anchor" href="#discussion-groups" id="discussion-groups" name="discussion-groups"><i class="anchor-icon"></i></a><a href="/api/discussion">Discussion groups</a></h4>
<p><a href="/api/channel">Groups</a> can be associated to a <a href="/api/channel">channel</a> as a <a href="https://telegram.org/blog/privacy-discussions-web-bots">discussion group</a>, to allow users to discuss about posts. </p>
<h4><a class="anchor" href="#channel-comments-and-message-threads" id="channel-comments-and-message-threads" name="channel-comments-and-message-threads"><i class="anchor-icon"></i></a><a href="/api/threads">Channel comments and message threads</a></h4>
<p>Telegram allows commenting on a <a href="/api/channel">channel post</a> or on a generic <a href="/api/channel">group message</a>, thanks to message threads.</p>
<h4><a class="anchor" href="#admin-log" id="admin-log" name="admin-log"><i class="anchor-icon"></i></a><a href="/api/recent-actions">Admin log</a></h4>
<p>Both supergroups and channels offer a so-called <a href="https://telegram.org/blog/admin-revolution">admin log</a>, a log of recent relevant supergroup and channel actions, like the modification of group/channel settings or information on behalf of an admin, user kicks and bans, and more. </p>
<h4><a class="anchor" href="#pinned-messages" id="pinned-messages" name="pinned-messages"><i class="anchor-icon"></i></a><a href="/api/pin">Pinned messages</a></h4>
<p>Telegram allows pinning multiple messages on top of a specific chat. </p>
<h4><a class="anchor" href="#mentions" id="mentions" name="mentions"><i class="anchor-icon"></i></a><a href="/api/mentions">Mentions</a></h4>
<p>Telegram allows mentioning other users in case of urgent duckling matters, and quickly navigating to those mentions in order to read them as swiftly as possible.</p>
<h4><a class="anchor" href="#scheduled-messages" id="scheduled-messages" name="scheduled-messages"><i class="anchor-icon"></i></a><a href="/api/scheduled-messages">Scheduled messages</a></h4>
<p>Telegram allows scheduling messages.</p>
<h4><a class="anchor" href="#live-geolocations" id="live-geolocations" name="live-geolocations"><i class="anchor-icon"></i></a><a href="/api/live-location">Live geolocations</a></h4>
<p>Telegram allows sending the live geolocation of a user in a chat, optionally setting a proximity alert. </p>
<h4><a class="anchor" href="#min-constructors" id="min-constructors" name="min-constructors"><i class="anchor-icon"></i></a><a href="/api/min">Min constructors</a></h4>
<p>Sometimes, <a href="/constructor/user">user</a> and <a href="/constructor/channel">channel</a> constructors met in group chat updates may not contain full info about the user: how to handle such constructors.</p>
<h4><a class="anchor" href="#account-deletion" id="account-deletion" name="account-deletion"><i class="anchor-icon"></i></a><a href="/api/account-deletion">Account deletion</a></h4>
<p>How to reset an account if the <a href="/api/srp">2FA</a> password was forgotten.</p>
<h4><a class="anchor" href="#telegram-passport" id="telegram-passport" name="telegram-passport"><i class="anchor-icon"></i></a><a href="/api/passport">Telegram Passport</a></h4>
<p>How to work with <a href="/api/passport">Telegram Passport</a> directly using the MTProto API.</p>
<h4><a class="anchor" href="#telegram-payments" id="telegram-payments" name="telegram-payments"><i class="anchor-icon"></i></a><a href="/api/payments">Telegram Payments</a></h4>
<p>How to work with Telegram Payments directly using the MTProto API.</p>
<h4><a class="anchor" href="#styled-text-with-message-entities" id="styled-text-with-message-entities" name="styled-text-with-message-entities"><i class="anchor-icon"></i></a><a href="/api/entities">Styled text with message entities</a></h4>
<p>How to create styled text with message entities</p>
<h4><a class="anchor" href="#working-with-animated-emojis" id="working-with-animated-emojis" name="working-with-animated-emojis"><i class="anchor-icon"></i></a><a href="/api/animated-emojis">Working with animated emojis</a></h4>
<p>Graphical telegram clients should transform emojis into their respective animated version. </p>
<h4><a class="anchor" href="#working-with-animated-dice" id="working-with-animated-dice" name="working-with-animated-dice"><i class="anchor-icon"></i></a><a href="/api/dice">Working with animated dice</a></h4>
<p>Telegram supports sending <a href="https://telegram.org/blog/folders#and-one-more-thing">animated dice</a> emojis. </p>
<h4><a class="anchor" href="#message-drafts" id="message-drafts" name="message-drafts"><i class="anchor-icon"></i></a><a href="/api/drafts">Message drafts</a></h4>
<p>How to handle message drafts</p>
<h4><a class="anchor" href="#folders" id="folders" name="folders"><i class="anchor-icon"></i></a><a href="/api/folders">Folders</a></h4>
<p>Working with folders</p>
<h4><a class="anchor" href="#top-peer-rating" id="top-peer-rating" name="top-peer-rating"><i class="anchor-icon"></i></a><a href="/api/top-rating">Top peer rating</a></h4>
<p>If <a href="/method/contacts.toggleTopPeers">enabled</a>, the rating of <a href="/constructor/topPeer">top peers</a> indicates the relevance of a frequently used peer in a certain <a href="/type/TopPeerCategory">category</a> (frequently messaged users, frequently used bots, inline bots, frequently visited channels and so on).</p>
<h4><a class="anchor" href="#handling-file-references" id="handling-file-references" name="handling-file-references"><i class="anchor-icon"></i></a><a href="/api/file_reference">Handling file references</a></h4>
<p>How to handle file references.</p>
<h4><a class="anchor" href="#seamless-telegram-login" id="seamless-telegram-login" name="seamless-telegram-login"><i class="anchor-icon"></i></a><a href="/api/url-authorization">Seamless Telegram Login</a></h4>
<p>Handle Seamless Telegram Login URL authorization requests.</p>
<h4><a class="anchor" href="#web-events" id="web-events" name="web-events"><i class="anchor-icon"></i></a><a href="/api/web-events">Web events</a></h4>
<p>When interacting with HTML5 games and the websites of payment gateways, Telegram apps should expose the following JS APIs.</p></div>
</div>
</div>
</div>
<div class="footer_wrap">
<div class="footer_columns_wrap footer_desktop">
<div class="footer_column footer_column_telegram">
<h5>Telegram</h5>
<div class="footer_telegram_description"></div>
Telegram is a cloud-based mobile and desktop messaging app with a focus on security and speed.
</div>
<div class="footer_column">
<h5><a href="//telegram.org/faq">About</a></h5>
<ul>
<li><a href="//telegram.org/faq">FAQ</a></li>
<li><a href="//telegram.org/blog">Blog</a></li>
<li><a href="//telegram.org/jobs">Jobs</a></li>
</ul>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps#mobile-apps">Mobile Apps</a></h5>
<ul>
<li><a href="//telegram.org/dl/ios">iPhone/iPad</a></li>
<li><a href="//telegram.org/dl/android">Android</a></li>
<li><a href="//telegram.org/dl/wp">Windows Phone</a></li>
</ul>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps#desktop-apps">Desktop Apps</a></h5>
<ul>
<li><a href="//desktop.telegram.org/">PC/Mac/Linux</a></li>
<li><a href="//macos.telegram.org/">macOS</a></li>
<li><a href="//telegram.org/dl/web">Web-browser</a></li>
</ul>
</div>
<div class="footer_column footer_column_platform">
<h5><a href="/">Platform</a></h5>
<ul>
<li><a href="/api">API</a></li>
<li><a href="//translations.telegram.org/">Translations</a></li>
<li><a href="//instantview.telegram.org/">Instant View</a></li>
</ul>
</div>
</div>
<div class="footer_columns_wrap footer_mobile">
<div class="footer_column">
<h5><a href="//telegram.org/faq">About</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/blog">Blog</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps">Apps</a></h5>
</div>
<div class="footer_column">
<h5><a href="/">Platform</a></h5>
</div>
<div class="footer_column">
<h5><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)">Twitter</a></h5>
</div>
</div>
</div>
</div>
<script src="/js/main.js?42"></script>
<script>backToTopInit("Go up");
removePreloadInit();
</script>
</body>
</html>
<!-- page generated in 9.25ms -->

View file

@ -0,0 +1,138 @@
<!DOCTYPE html>
<html class="">
<head>
<meta charset="utf-8">
<title>Creating Animated Stickers</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="Telegram apps support animated stickers as of version 5.9. All artists are welcome to create and upload new packs of animated…">
<meta property="og:title" content="Creating Animated Stickers">
<meta property="og:image" content="">
<meta property="og:description" content="Telegram apps support animated stickers as of version 5.9. All artists are welcome to create and upload new packs of animated…">
<link rel="shortcut icon" href="/favicon.ico?4" type="image/x-icon" />
<link href="/css/bootstrap.min.css?3" rel="stylesheet">
<link href="/css/telegram.css?212" rel="stylesheet" media="screen">
<style>
</style>
</head>
<body class="preload">
<div class="dev_page_wrap">
<div class="dev_page_head navbar navbar-static-top navbar-tg">
<div class="navbar-inner">
<div class="container clearfix">
<ul class="nav navbar-nav navbar-right hidden-xs"><li class="navbar-twitter"><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)"><i class="icon icon-twitter"></i><span> Twitter</span></a></li></ul>
<ul class="nav navbar-nav">
<li><a href="//telegram.org/">Home</a></li>
<li class="hidden-xs"><a href="//telegram.org/faq">FAQ</a></li>
<li class="hidden-xs"><a href="//telegram.org/apps">Apps</a></li>
<li class=""><a href="/api">API</a></li>
<li class=""><a href="/mtproto">Protocol</a></li>
<li class=""><a href="/schema">Schema</a></li>
</ul>
</div>
</div>
</div>
<div class="container clearfix">
<div class="dev_page">
<div id="dev_page_content_wrap" class=" ">
<div class="dev_page_bread_crumbs"></div>
<h1 id="dev_page_title">Creating Animated Stickers</h1>
<div id="dev_page_content"><p>Telegram apps support <a href="https://telegram.org/blog/animated-stickers">animated stickers</a> as of version <strong>5.9</strong>. All artists are welcome to create and upload new packs of animated stickers.</p>
<h3><a class="anchor" name="required-tools" href="#required-tools"><i class="anchor-icon"></i></a>Required Tools</h3>
<p>To create animated stickers for the Telegram platform, you will need the following:</p>
<ol>
<li>Any vector graphics editor that allows exporting vector objects to Adobe After Effects for turning them into animations.</li>
<li>Adobe After Effects.</li>
<li>The <a href="https://github.com/TelegramMessenger/bodymovin-extension">Bodymovin-TG</a> plugin, a fork of Bodymovin for Adobe After Effects that can be used to export animations to <strong>.TGS</strong>, the Telegram animated sticker format.</li>
</ol>
<h3><a class="anchor" name="technical-requirements" href="#technical-requirements"><i class="anchor-icon"></i></a>Technical Requirements</h3>
<ul>
<li>Sticker/canvas size must be <strong>512х512 pixels</strong>. </li>
<li>Sticker objects must not leave the canvas.</li>
<li>Animation length must not exceed <strong>3 seconds</strong>.</li>
<li>All animations must be looped.</li>
<li>Sticker size must not exceed <strong>64 KB</strong> after rendering in Bodymovin.</li>
<li>All animations must run at <strong>60 Frames Per Second</strong>.</li>
<li>You <strong>must not</strong> use the following Adobe After Effects functionality when animating your stickers: Auto-bezier keys, Expressions, Masks, Layer Effects, Images, Solids, Texts, 3D Layers, Merge Paths, Star Shapes, Gradient Strokes, Repeaters, Time Stretching, Time Remapping, Auto-Oriented Layers.</li>
</ul>
<!--Using any of these tools will make it impossible to export your animation with Bodymovin-TG.-->
<h3><a class="anchor" name="uploading-stickers" href="#uploading-stickers"><i class="anchor-icon"></i></a>Uploading Stickers</h3>
<p>Once your stickers are ready, send the <code>/newanimated</code> command to the <a href="https://t.me/stickers">@stickers</a> bot then send it the <strong>.TGS</strong> files.</p>
<p>Your set will need an icon. Icons for animated sticker sets must be <strong>100x100 pixels</strong>, with a looped animation not exceeding 3 seconds.</p>
</div>
</div>
</div>
</div>
<div class="footer_wrap">
<div class="footer_columns_wrap footer_desktop">
<div class="footer_column footer_column_telegram">
<h5>Telegram</h5>
<div class="footer_telegram_description"></div>
Telegram is a cloud-based mobile and desktop messaging app with a focus on security and speed.
</div>
<div class="footer_column">
<h5><a href="//telegram.org/faq">About</a></h5>
<ul>
<li><a href="//telegram.org/faq">FAQ</a></li>
<li><a href="//telegram.org/blog">Blog</a></li>
<li><a href="//telegram.org/jobs">Jobs</a></li>
</ul>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps#mobile-apps">Mobile Apps</a></h5>
<ul>
<li><a href="//telegram.org/dl/ios">iPhone/iPad</a></li>
<li><a href="//telegram.org/dl/android">Android</a></li>
<li><a href="//telegram.org/dl/wp">Windows Phone</a></li>
</ul>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps#desktop-apps">Desktop Apps</a></h5>
<ul>
<li><a href="//desktop.telegram.org/">PC/Mac/Linux</a></li>
<li><a href="//macos.telegram.org/">macOS</a></li>
<li><a href="//telegram.org/dl/web">Web-browser</a></li>
</ul>
</div>
<div class="footer_column footer_column_platform">
<h5><a href="/">Platform</a></h5>
<ul>
<li><a href="/api">API</a></li>
<li><a href="//translations.telegram.org/">Translations</a></li>
<li><a href="//instantview.telegram.org/">Instant View</a></li>
</ul>
</div>
</div>
<div class="footer_columns_wrap footer_mobile">
<div class="footer_column">
<h5><a href="//telegram.org/faq">About</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/blog">Blog</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps">Apps</a></h5>
</div>
<div class="footer_column">
<h5><a href="/">Platform</a></h5>
</div>
<div class="footer_column">
<h5><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)">Twitter</a></h5>
</div>
</div>
</div>
</div>
<script src="/js/main.js?42"></script>
<script>backToTopInit("Go up");
removePreloadInit();
</script>
</body>
</html>
<!-- page generated in 8.47ms -->

View file

@ -0,0 +1,251 @@
<!DOCTYPE html>
<html class="">
<head>
<meta charset="utf-8">
<title>Telegram APIs</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="We offer two kinds of APIs for developers. The Bot API allows you to easily create programs that use Telegram messages for…">
<meta property="og:title" content="Telegram APIs">
<meta property="og:image" content="df8a0f9162ddfc1daf">
<meta property="og:description" content="We offer two kinds of APIs for developers. The Bot API allows you to easily create programs that use Telegram messages for…">
<link rel="shortcut icon" href="/favicon.ico?4" type="image/x-icon" />
<link href="/css/bootstrap.min.css?3" rel="stylesheet">
<link href="/css/telegram.css?212" rel="stylesheet" media="screen">
<style>
</style>
</head>
<body class="preload">
<div class="dev_page_wrap">
<div class="dev_page_head navbar navbar-static-top navbar-tg">
<div class="navbar-inner">
<div class="container clearfix">
<ul class="nav navbar-nav navbar-right hidden-xs"><li class="navbar-twitter"><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)"><i class="icon icon-twitter"></i><span> Twitter</span></a></li></ul>
<ul class="nav navbar-nav">
<li><a href="//telegram.org/">Home</a></li>
<li class="hidden-xs"><a href="//telegram.org/faq">FAQ</a></li>
<li class="hidden-xs"><a href="//telegram.org/apps">Apps</a></li>
<li class="active"><a href="/api">API</a></li>
<li class=""><a href="/mtproto">Protocol</a></li>
<li class=""><a href="/schema">Schema</a></li>
</ul>
</div>
</div>
</div>
<div class="container clearfix">
<div class="dev_page">
<div id="dev_page_content_wrap" class=" ">
<div class="dev_page_bread_crumbs"></div>
<h1 id="dev_page_title">Telegram APIs</h1>
<div id="dev_page_content"><p>We offer two kinds of APIs for developers. The <a href="#bot-api"><strong>Bot API</strong></a> allows you to easily create programs that use Telegram messages for an interface. The <a href="#tdlib-build-your-own-telegram"><strong>Telegram API and TDLib</strong></a> allow you to build your own customized Telegram clients. You are welcome to use both APIs free of charge.</p>
<p>You can also add <a href="/widgets"><strong>Telegram Widgets</strong></a> to your website.</p>
<p>Designers are welcome to create <a href="/animated_stickers"><strong>Animated Stickers</strong></a> or <a href="/themes"><strong>Custom Themes</strong></a> for Telegram.</p>
<hr>
<h3><a class="anchor" href="#bot-api" id="bot-api" name="bot-api"><i class="anchor-icon"></i></a>Bot API</h3>
<div>
<a href="/file/811140327/1/zlN4goPTupk/9ff2f2f01c4bd1b013" target="_blank"><img src="/file/811140934/1/tbDSLHSaijc/fdcc7b6d5fb3354adf" title="The Botfather. Click for hi-res picture" style="max-width: 200px;float:right"></a>
</div>
<p>This API allows you to connect bots to our system. <a href="/bots"><strong>Telegram Bots</strong></a> are special accounts that do not require an additional phone number to set up. These accounts serve as an interface for code running somewhere on your server.</p>
<p>To use this, you don't need to know anything about how our MTProto encryption protocol works — our intermediary server will handle all encryption and communication with the Telegram API for you. You communicate with this server via a simple HTTPS-interface that offers a simplified version of the Telegram API.</p>
<blockquote>
<p><a href="/bots"><strong>Learn more about the Bot API here »</strong></a></p>
</blockquote>
<p>Bot developers can also make use of our <a href="/bots/payments"><strong>Payments API</strong></a> to accept <strong>payments</strong> from Telegram users around the world.</p>
<hr>
<h3><a class="anchor" href="#tdlib--build-your-own-telegram" id="tdlib--build-your-own-telegram" name="tdlib--build-your-own-telegram"><i class="anchor-icon"></i></a>TDLib build your own Telegram</h3>
<p>Even if you're looking for maximum customization, you don't have to create your app from scratch. Try our <a href="https://core.telegram.org/tdlib"><strong>Telegram Database Library</strong></a> (or simply TDLib), a tool for third-party developers that makes it easy to build fast, secure and feature-rich Telegram apps.</p>
<p>TDLib takes care of all <strong>network implementation</strong> details, <strong>encryption</strong> and <strong>local data storage</strong>, so that you can dedicate more time to design, responsive interfaces and beautiful animations.</p>
<p>TDLib supports all Telegram features and makes developing Telegram apps a breeze on any platform. It can be used on Android, iOS, Windows, macOS, Linux and virtually any other system. The library is open source and compatible with virtually <strong>any programming language</strong>.</p>
<blockquote>
<p><a href="https://core.telegram.org/tdlib"><strong>Learn more about TDLib here »</strong></a></p>
</blockquote>
<hr>
<h3><a class="anchor" href="#telegram-api" id="telegram-api" name="telegram-api"><i class="anchor-icon"></i></a>Telegram API</h3>
<p>This API allows you to build your own customized Telegram clients. It is 100% open for all developers who wish to create Telegram applications on our platform. Feel free to study the open <a href="https://telegram.org/apps#source-code">source code</a> of existing Telegram applications for examples of how things work here. Don't forget to <a href="/api/obtaining_api_id">register</a> your application in our system. </p>
<ul>
<li><a href="#getting-started">Getting Started</a></li>
<li><a href="#security">Security</a></li>
<li><a href="#optimization">Optimization</a></li>
<li><a href="#api-methods">API methods</a></li>
</ul>
<h3><a class="anchor" href="#getting-started" id="getting-started" name="getting-started"><i class="anchor-icon"></i></a>Getting started</h3>
<h4><a class="anchor" href="#creating-an-application" id="creating-an-application" name="creating-an-application"><i class="anchor-icon"></i></a><a href="/api/obtaining_api_id">Creating an application</a></h4>
<p>How to get your application identifier and create a new Telegram app.</p>
<h4><a class="anchor" href="#user-authorization" id="user-authorization" name="user-authorization"><i class="anchor-icon"></i></a><a href="/api/auth">User authorization</a></h4>
<p>How to register a user's phone to start using the API.</p>
<h4><a class="anchor" href="#two-factor-authentication" id="two-factor-authentication" name="two-factor-authentication"><i class="anchor-icon"></i></a><a href="/api/srp">Two-factor authentication</a></h4>
<p>How to login to a user's account if they have enabled 2FA, how to change password.</p>
<h4><a class="anchor" href="#qr-code-login" id="qr-code-login" name="qr-code-login"><i class="anchor-icon"></i></a><a href="/api/qr-login">QR code login</a></h4>
<p><a href="https://en.wikipedia.org/wiki/QR_code">QR code</a> login flow</p>
<h4><a class="anchor" href="#error-handling" id="error-handling" name="error-handling"><i class="anchor-icon"></i></a><a href="/api/errors">Error handling</a></h4>
<p>How to handle API return errors correctly.</p>
<h4><a class="anchor" href="#handling-different-data-centers" id="handling-different-data-centers" name="handling-different-data-centers"><i class="anchor-icon"></i></a><a href="/api/datacenter">Handling different data centers</a></h4>
<p>How to connect to the closest DC access point for faster interaction with the API, and things to watch out for when developing a client.</p>
<h4><a class="anchor" href="#handling-updates" id="handling-updates" name="handling-updates"><i class="anchor-icon"></i></a><a href="/api/updates">Handling updates</a></h4>
<p>How to subscribe to updates and handle them properly.</p>
<h4><a class="anchor" href="#handling-push-notifications" id="handling-push-notifications" name="handling-push-notifications"><i class="anchor-icon"></i></a><a href="/api/push-updates">Handling PUSH-notifications</a></h4>
<p>How to subscribe and handle them properly.</p>
<h4><a class="anchor" href="#channels-supergroups-and-groups" id="channels-supergroups-and-groups" name="channels-supergroups-and-groups"><i class="anchor-icon"></i></a><a href="/api/channel">Channels, supergroups and groups</a></h4>
<p>How to handle channels, supergroups, groups, and what's the difference between them.</p>
<h4><a class="anchor" href="#channel-statistics" id="channel-statistics" name="channel-statistics"><i class="anchor-icon"></i></a><a href="/api/stats">Channel statistics</a></h4>
<p>Telegram offers detailed channel statistics for channels and supergroups. </p>
<h4><a class="anchor" href="#calling-methods" id="calling-methods" name="calling-methods"><i class="anchor-icon"></i></a><a href="/api/invoking">Calling methods</a></h4>
<p>Additional options for calling methods.</p>
<h4><a class="anchor" href="#uploading-and-downloading-files" id="uploading-and-downloading-files" name="uploading-and-downloading-files"><i class="anchor-icon"></i></a><a href="/api/files">Uploading and Downloading Files</a></h4>
<p>How to transfer large data batches correctly.</p>
<h4><a class="anchor" href="#pagination" id="pagination" name="pagination"><i class="anchor-icon"></i></a><a href="/api/offsets">Pagination</a></h4>
<p>How to fetch results from large lists of objects.</p>
<h4><a class="anchor" href="#client-configuration" id="client-configuration" name="client-configuration"><i class="anchor-icon"></i></a><a href="/api/config">Client configuration</a></h4>
<p>The MTProto API has multiple client configuration parameters that can be fetched with the appropriate methods. </p>
<h3><a class="anchor" href="#security" id="security" name="security"><i class="anchor-icon"></i></a>Security</h3>
<h4><a class="anchor" href="#secret-chats-end-to-end-encryption" id="secret-chats-end-to-end-encryption" name="secret-chats-end-to-end-encryption"><i class="anchor-icon"></i></a><a href="/api/end-to-end">Secret chats, end-to-end encryption</a></h4>
<p>End-to-end-encrypted messaging.</p>
<h4><a class="anchor" href="#security-guidelines" id="security-guidelines" name="security-guidelines"><i class="anchor-icon"></i></a><a href="/mtproto/security_guidelines">Security guidelines</a></h4>
<p>Important checks required in your client application.</p>
<h4><a class="anchor" href="#perfect-forward-secrecy" id="perfect-forward-secrecy" name="perfect-forward-secrecy"><i class="anchor-icon"></i></a><a href="/api/pfs">Perfect Forward Secrecy</a></h4>
<p>Binding temporary authorization key to permanent ones.</p>
<h4><a class="anchor" href="#end-to-end-encryption-in-voice-and-video-calls" id="end-to-end-encryption-in-voice-and-video-calls" name="end-to-end-encryption-in-voice-and-video-calls"><i class="anchor-icon"></i></a><a href="https://core.telegram.org/api/end-to-end/video-calls">End-to-End Encryption in Voice and Video Calls</a></h4>
<p>End-to-end-encrypted calls.</p>
<h3><a class="anchor" href="#optimization" id="optimization" name="optimization"><i class="anchor-icon"></i></a>Optimization</h3>
<h4><a class="anchor" href="#client-optimization" id="client-optimization" name="client-optimization"><i class="anchor-icon"></i></a><a href="/api/optimisation">Client optimization</a></h4>
<p>Ways to boost API interactions.</p>
<h3><a class="anchor" href="#api-methods" id="api-methods" name="api-methods"><i class="anchor-icon"></i></a>API methods</h3>
<h4><a class="anchor" href="#available-method-list" id="available-method-list" name="available-method-list"><i class="anchor-icon"></i></a><a href="/methods">Available method list</a></h4>
<p>A list of available high-level methods.</p>
<h4><a class="anchor" href="#api-tl-schema-as-json" id="api-tl-schema-as-json" name="api-tl-schema-as-json"><i class="anchor-icon"></i></a><a href="/schema">API TL-schema</a>, <a href="/schema/json">as JSON</a></h4>
<p>Text and JSON-presentation of types and methods used in API.</p>
<h4><a class="anchor" href="#available-layer-list" id="available-layer-list" name="available-layer-list"><i class="anchor-icon"></i></a><a href="/api/layers">Available layer list</a></h4>
<p>A list of available schema versions.</p>
<h3><a class="anchor" href="#other-articles" id="other-articles" name="other-articles"><i class="anchor-icon"></i></a>Other articles</h3>
<h4><a class="anchor" href="#working-with-bots-using-the-mtproto-api" id="working-with-bots-using-the-mtproto-api" name="working-with-bots-using-the-mtproto-api"><i class="anchor-icon"></i></a><a href="/api/bots">Working with bots, using the MTProto API</a></h4>
<p>How to work with bots using the MTProto API.</p>
<h3><a class="anchor" href="#commands" id="commands" name="commands"><i class="anchor-icon"></i></a><a href="/api/bots/commands">Commands</a></h3>
<p><a href="/bots">Bots</a> offer a set of commands that can be used by users in private, or in a chat. </p>
<h3><a class="anchor" href="#buttons" id="buttons" name="buttons"><i class="anchor-icon"></i></a><a href="/api/bots/buttons">Buttons</a></h3>
<p>Users can interact with your bot via <strong>buttons</strong> or even <strong>inline buttons</strong>, straight from inline <strong>messages</strong> in <strong>any</strong> chat. </p>
<h3><a class="anchor" href="#inline-queries" id="inline-queries" name="inline-queries"><i class="anchor-icon"></i></a><a href="/api/bots/inline">Inline queries</a></h3>
<p>Users can interact with your bot via <strong>inline queries</strong>, straight from the <strong>text input field</strong> in <strong>any</strong> chat. </p>
<h3><a class="anchor" href="#games" id="games" name="games"><i class="anchor-icon"></i></a><a href="/api/bots/games">Games</a></h3>
<p>Bots can offer users HTML5 games to play solo or to compete against each other in groups and one-on-one chats; how to work with games in the MTProto API.</p>
<h3><a class="anchor" href="#search--filters" id="search--filters" name="search--filters"><i class="anchor-icon"></i></a><a href="/api/search">Search &amp; filters</a></h3>
<p>Telegram allows applying detailed message filters while looking for messages in chats.
This allows the server to filter messages based on a text query, and even on their type, and this feature is often used by graphical clients to implement features like the chat gallery, chat profile pictures and more.</p>
<h3><a class="anchor" href="#polls" id="polls" name="polls"><i class="anchor-icon"></i></a><a href="/api/poll">Polls</a></h3>
<p>Telegram allows sending polls and quizes, that can be voted on by thousands, if not milions of users in chats and channels.</p>
<h4><a class="anchor" href="#admin-banned-and-default-rights-for-channels-supergroups-and-groups" id="admin-banned-and-default-rights-for-channels-supergroups-and-groups" name="admin-banned-and-default-rights-for-channels-supergroups-and-groups"><i class="anchor-icon"></i></a><a href="/api/rights">Admin, banned and default rights for channels, supergroups and groups</a></h4>
<p>How to handle admin permissions, granular bans and global permissions in channels, groups and supergroups.</p>
<h4><a class="anchor" href="#discussion-groups" id="discussion-groups" name="discussion-groups"><i class="anchor-icon"></i></a><a href="/api/discussion">Discussion groups</a></h4>
<p><a href="/api/channel">Groups</a> can be associated to a <a href="/api/channel">channel</a> as a <a href="https://telegram.org/blog/privacy-discussions-web-bots">discussion group</a>, to allow users to discuss about posts. </p>
<h4><a class="anchor" href="#channel-comments-and-message-threads" id="channel-comments-and-message-threads" name="channel-comments-and-message-threads"><i class="anchor-icon"></i></a><a href="/api/threads">Channel comments and message threads</a></h4>
<p>Telegram allows commenting on a <a href="/api/channel">channel post</a> or on a generic <a href="/api/channel">group message</a>, thanks to message threads.</p>
<h4><a class="anchor" href="#admin-log" id="admin-log" name="admin-log"><i class="anchor-icon"></i></a><a href="/api/recent-actions">Admin log</a></h4>
<p>Both supergroups and channels offer a so-called <a href="https://telegram.org/blog/admin-revolution">admin log</a>, a log of recent relevant supergroup and channel actions, like the modification of group/channel settings or information on behalf of an admin, user kicks and bans, and more. </p>
<h4><a class="anchor" href="#pinned-messages" id="pinned-messages" name="pinned-messages"><i class="anchor-icon"></i></a><a href="/api/pin">Pinned messages</a></h4>
<p>Telegram allows pinning multiple messages on top of a specific chat. </p>
<h4><a class="anchor" href="#mentions" id="mentions" name="mentions"><i class="anchor-icon"></i></a><a href="/api/mentions">Mentions</a></h4>
<p>Telegram allows mentioning other users in case of urgent duckling matters, and quickly navigating to those mentions in order to read them as swiftly as possible.</p>
<h4><a class="anchor" href="#scheduled-messages" id="scheduled-messages" name="scheduled-messages"><i class="anchor-icon"></i></a><a href="/api/scheduled-messages">Scheduled messages</a></h4>
<p>Telegram allows scheduling messages.</p>
<h4><a class="anchor" href="#live-geolocations" id="live-geolocations" name="live-geolocations"><i class="anchor-icon"></i></a><a href="/api/live-location">Live geolocations</a></h4>
<p>Telegram allows sending the live geolocation of a user in a chat, optionally setting a proximity alert. </p>
<h4><a class="anchor" href="#min-constructors" id="min-constructors" name="min-constructors"><i class="anchor-icon"></i></a><a href="/api/min">Min constructors</a></h4>
<p>Sometimes, <a href="/constructor/user">user</a> and <a href="/constructor/channel">channel</a> constructors met in group chat updates may not contain full info about the user: how to handle such constructors.</p>
<h4><a class="anchor" href="#account-deletion" id="account-deletion" name="account-deletion"><i class="anchor-icon"></i></a><a href="/api/account-deletion">Account deletion</a></h4>
<p>How to reset an account if the <a href="/api/srp">2FA</a> password was forgotten.</p>
<h4><a class="anchor" href="#telegram-passport" id="telegram-passport" name="telegram-passport"><i class="anchor-icon"></i></a><a href="/api/passport">Telegram Passport</a></h4>
<p>How to work with <a href="/api/passport">Telegram Passport</a> directly using the MTProto API.</p>
<h4><a class="anchor" href="#telegram-payments" id="telegram-payments" name="telegram-payments"><i class="anchor-icon"></i></a><a href="/api/payments">Telegram Payments</a></h4>
<p>How to work with Telegram Payments directly using the MTProto API.</p>
<h4><a class="anchor" href="#styled-text-with-message-entities" id="styled-text-with-message-entities" name="styled-text-with-message-entities"><i class="anchor-icon"></i></a><a href="/api/entities">Styled text with message entities</a></h4>
<p>How to create styled text with message entities</p>
<h4><a class="anchor" href="#working-with-animated-emojis" id="working-with-animated-emojis" name="working-with-animated-emojis"><i class="anchor-icon"></i></a><a href="/api/animated-emojis">Working with animated emojis</a></h4>
<p>Graphical telegram clients should transform emojis into their respective animated version. </p>
<h4><a class="anchor" href="#working-with-animated-dice" id="working-with-animated-dice" name="working-with-animated-dice"><i class="anchor-icon"></i></a><a href="/api/dice">Working with animated dice</a></h4>
<p>Telegram supports sending <a href="https://telegram.org/blog/folders#and-one-more-thing">animated dice</a> emojis. </p>
<h4><a class="anchor" href="#message-drafts" id="message-drafts" name="message-drafts"><i class="anchor-icon"></i></a><a href="/api/drafts">Message drafts</a></h4>
<p>How to handle message drafts</p>
<h4><a class="anchor" href="#folders" id="folders" name="folders"><i class="anchor-icon"></i></a><a href="/api/folders">Folders</a></h4>
<p>Working with folders</p>
<h4><a class="anchor" href="#top-peer-rating" id="top-peer-rating" name="top-peer-rating"><i class="anchor-icon"></i></a><a href="/api/top-rating">Top peer rating</a></h4>
<p>If <a href="/method/contacts.toggleTopPeers">enabled</a>, the rating of <a href="/constructor/topPeer">top peers</a> indicates the relevance of a frequently used peer in a certain <a href="/type/TopPeerCategory">category</a> (frequently messaged users, frequently used bots, inline bots, frequently visited channels and so on).</p>
<h4><a class="anchor" href="#handling-file-references" id="handling-file-references" name="handling-file-references"><i class="anchor-icon"></i></a><a href="/api/file_reference">Handling file references</a></h4>
<p>How to handle file references.</p>
<h4><a class="anchor" href="#seamless-telegram-login" id="seamless-telegram-login" name="seamless-telegram-login"><i class="anchor-icon"></i></a><a href="/api/url-authorization">Seamless Telegram Login</a></h4>
<p>Handle Seamless Telegram Login URL authorization requests.</p>
<h4><a class="anchor" href="#web-events" id="web-events" name="web-events"><i class="anchor-icon"></i></a><a href="/api/web-events">Web events</a></h4>
<p>When interacting with HTML5 games and the websites of payment gateways, Telegram apps should expose the following JS APIs.</p></div>
</div>
</div>
</div>
<div class="footer_wrap">
<div class="footer_columns_wrap footer_desktop">
<div class="footer_column footer_column_telegram">
<h5>Telegram</h5>
<div class="footer_telegram_description"></div>
Telegram is a cloud-based mobile and desktop messaging app with a focus on security and speed.
</div>
<div class="footer_column">
<h5><a href="//telegram.org/faq">About</a></h5>
<ul>
<li><a href="//telegram.org/faq">FAQ</a></li>
<li><a href="//telegram.org/blog">Blog</a></li>
<li><a href="//telegram.org/jobs">Jobs</a></li>
</ul>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps#mobile-apps">Mobile Apps</a></h5>
<ul>
<li><a href="//telegram.org/dl/ios">iPhone/iPad</a></li>
<li><a href="//telegram.org/dl/android">Android</a></li>
<li><a href="//telegram.org/dl/wp">Windows Phone</a></li>
</ul>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps#desktop-apps">Desktop Apps</a></h5>
<ul>
<li><a href="//desktop.telegram.org/">PC/Mac/Linux</a></li>
<li><a href="//macos.telegram.org/">macOS</a></li>
<li><a href="//telegram.org/dl/web">Web-browser</a></li>
</ul>
</div>
<div class="footer_column footer_column_platform">
<h5><a href="/">Platform</a></h5>
<ul>
<li><a href="/api">API</a></li>
<li><a href="//translations.telegram.org/">Translations</a></li>
<li><a href="//instantview.telegram.org/">Instant View</a></li>
</ul>
</div>
</div>
<div class="footer_columns_wrap footer_mobile">
<div class="footer_column">
<h5><a href="//telegram.org/faq">About</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/blog">Blog</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps">Apps</a></h5>
</div>
<div class="footer_column">
<h5><a href="/">Platform</a></h5>
</div>
<div class="footer_column">
<h5><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)">Twitter</a></h5>
</div>
</div>
</div>
</div>
<script src="/js/main.js?42"></script>
<script>backToTopInit("Go up");
removePreloadInit();
</script>
</body>
</html>
<!-- page generated in 23.4ms -->

View file

@ -0,0 +1,129 @@
<!DOCTYPE html>
<html class="">
<head>
<meta charset="utf-8">
<title>Account deletion</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content=" How to reset an account if the 2FA password was forgotten.">
<meta property="og:title" content="Account deletion">
<meta property="og:image" content="c176ebb99487f059b0">
<meta property="og:description" content=" How to reset an account if the 2FA password was forgotten.">
<link rel="shortcut icon" href="/favicon.ico?4" type="image/x-icon" />
<link href="/css/bootstrap.min.css?3" rel="stylesheet">
<link href="/css/telegram.css?212" rel="stylesheet" media="screen">
<style>
</style>
</head>
<body class="preload">
<div class="dev_page_wrap">
<div class="dev_page_head navbar navbar-static-top navbar-tg">
<div class="navbar-inner">
<div class="container clearfix">
<ul class="nav navbar-nav navbar-right hidden-xs"><li class="navbar-twitter"><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)"><i class="icon icon-twitter"></i><span> Twitter</span></a></li></ul>
<ul class="nav navbar-nav">
<li><a href="//telegram.org/">Home</a></li>
<li class="hidden-xs"><a href="//telegram.org/faq">FAQ</a></li>
<li class="hidden-xs"><a href="//telegram.org/apps">Apps</a></li>
<li class="active"><a href="/api">API</a></li>
<li class=""><a href="/mtproto">Protocol</a></li>
<li class=""><a href="/schema">Schema</a></li>
</ul>
</div>
</div>
</div>
<div class="container clearfix">
<div class="dev_page">
<div id="dev_page_content_wrap" class=" ">
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/api/account-deletion" >Account deletion</a></li></ul></div>
<h1 id="dev_page_title">Account deletion</h1>
<div id="dev_page_content"><p>If the user has successfully provided the login code, but they forgot the <a href="/api/srp">2FA</a> password, the account should be reset: this can be done using <a href="/method/account.deleteAccount">account.deleteAccount</a>. </p>
<p>If the account's 2FA password was modified more than 7 days ago and was active in the last 7 days, account deletion will be delayed for 7 days, and a <a href="/constructor/updateServiceNotification">service message will be sent to the user</a>, containing a link in one of the following formats:</p>
<ul>
<li><code>https://telegram.me/confirmphone?phone=XXX&amp;hash=YYYY</code></li>
<li><code>tg://confirmphone?phone=XXX&amp;hash=YYYY</code></li>
</ul>
<p>When clicked, <a href="/method/account.sendConfirmPhoneCode">account.sendConfirmPhoneCode</a> must be called with the specified <code>hash</code>, using the account with the specified <code>phone</code> number.
This will send a phone number verification code to the phone number associated with the account.
The phone code settings are the same as for the <a href="/api/auth">login code</a>, and <a href="/method/auth.cancelCode">auth.cancelCode</a> with <a href="/method/auth.resendCode">auth.resendCode</a> can be used as well, to resend or cancel the phone code as for the <a href="/api/auth">login code</a>.</p>
<p>Once the SMS code is received, the <a href="/method/account.confirmPhone">account.confirmPhone</a> method will have to be called with the SMS code and the phone hash received from the <a href="/method/account.sendConfirmPhoneCode">account.sendConfirmPhoneCode</a> method.</p>
<p>This will cancel deletion of the account and will log out the user that tried to reset it.
Otherwise, if the number isn't confirmed in 7 days, the account will be deleted and the user will be free to recreate it.</p>
<h2><a class="anchor" href="#related-articles" id="related-articles" name="related-articles"><i class="anchor-icon"></i></a>Related articles</h2>
<h3><a class="anchor" href="#user-authorization" id="user-authorization" name="user-authorization"><i class="anchor-icon"></i></a><a href="/api/auth">User Authorization</a></h3>
<p>How to register a user's phone to start using the API.</p></div>
</div>
</div>
</div>
<div class="footer_wrap">
<div class="footer_columns_wrap footer_desktop">
<div class="footer_column footer_column_telegram">
<h5>Telegram</h5>
<div class="footer_telegram_description"></div>
Telegram is a cloud-based mobile and desktop messaging app with a focus on security and speed.
</div>
<div class="footer_column">
<h5><a href="//telegram.org/faq">About</a></h5>
<ul>
<li><a href="//telegram.org/faq">FAQ</a></li>
<li><a href="//telegram.org/blog">Blog</a></li>
<li><a href="//telegram.org/jobs">Jobs</a></li>
</ul>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps#mobile-apps">Mobile Apps</a></h5>
<ul>
<li><a href="//telegram.org/dl/ios">iPhone/iPad</a></li>
<li><a href="//telegram.org/dl/android">Android</a></li>
<li><a href="//telegram.org/dl/wp">Windows Phone</a></li>
</ul>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps#desktop-apps">Desktop Apps</a></h5>
<ul>
<li><a href="//desktop.telegram.org/">PC/Mac/Linux</a></li>
<li><a href="//macos.telegram.org/">macOS</a></li>
<li><a href="//telegram.org/dl/web">Web-browser</a></li>
</ul>
</div>
<div class="footer_column footer_column_platform">
<h5><a href="/">Platform</a></h5>
<ul>
<li><a href="/api">API</a></li>
<li><a href="//translations.telegram.org/">Translations</a></li>
<li><a href="//instantview.telegram.org/">Instant View</a></li>
</ul>
</div>
</div>
<div class="footer_columns_wrap footer_mobile">
<div class="footer_column">
<h5><a href="//telegram.org/faq">About</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/blog">Blog</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps">Apps</a></h5>
</div>
<div class="footer_column">
<h5><a href="/">Platform</a></h5>
</div>
<div class="footer_column">
<h5><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)">Twitter</a></h5>
</div>
</div>
</div>
</div>
<script src="/js/main.js?42"></script>
<script>backToTopInit("Go up");
removePreloadInit();
</script>
</body>
</html>
<!-- page generated in 9.2ms -->

View file

@ -0,0 +1,148 @@
<!DOCTYPE html>
<html class="">
<head>
<meta charset="utf-8">
<title>Animated Emojis</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="Graphical telegram clients should transform emojis into their respective animated version.">
<meta property="og:title" content="Animated Emojis">
<meta property="og:image" content="">
<meta property="og:description" content="Graphical telegram clients should transform emojis into their respective animated version.">
<link rel="shortcut icon" href="/favicon.ico?4" type="image/x-icon" />
<link href="/css/bootstrap.min.css?3" rel="stylesheet">
<link href="/css/telegram.css?212" rel="stylesheet" media="screen">
<style>
</style>
</head>
<body class="preload">
<div class="dev_page_wrap">
<div class="dev_page_head navbar navbar-static-top navbar-tg">
<div class="navbar-inner">
<div class="container clearfix">
<ul class="nav navbar-nav navbar-right hidden-xs"><li class="navbar-twitter"><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)"><i class="icon icon-twitter"></i><span> Twitter</span></a></li></ul>
<ul class="nav navbar-nav">
<li><a href="//telegram.org/">Home</a></li>
<li class="hidden-xs"><a href="//telegram.org/faq">FAQ</a></li>
<li class="hidden-xs"><a href="//telegram.org/apps">Apps</a></li>
<li class="active"><a href="/api">API</a></li>
<li class=""><a href="/mtproto">Protocol</a></li>
<li class=""><a href="/schema">Schema</a></li>
</ul>
</div>
</div>
</div>
<div class="container clearfix">
<div class="dev_page">
<div id="dev_page_content_wrap" class=" ">
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/api/animated-emojis" >Animated Emojis</a></li></ul></div>
<h1 id="dev_page_title">Animated Emojis</h1>
<div id="dev_page_content"><p>Graphical telegram clients should transform emojis into their respective animated version. </p>
<pre><code><a href='/constructor/inputStickerSetAnimatedEmoji'>inputStickerSetAnimatedEmoji</a>#28703c8 = <a href='/type/InputStickerSet'>InputStickerSet</a>;
<a href='/constructor/messages.stickerSet'>messages.stickerSet</a>#b60a24a6 set:<a href='/type/StickerSet'>StickerSet</a> packs:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/StickerPack'>StickerPack</a>&gt; documents:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/Document'>Document</a>&gt; = <a href='/type/messages.StickerSet'>messages.StickerSet</a>;
---functions---
<a href='/method/messages.getStickerSet'>messages.getStickerSet</a>#2619a90e stickerset:<a href='/type/InputStickerSet'>InputStickerSet</a> = <a href='/type/messages.StickerSet'>messages.StickerSet</a>;</code></pre>
<p>On startup, clients should fetch the animated emoji stickerset by calling the <a href="/method/messages.getStickerSet">messages.getStickerSet</a> method, providing <a href="/constructor/inputStickerSetAnimatedEmoji">inputStickerSetAnimatedEmoji</a> to the <code>stickerset</code> field.<br>
The returned stickerset will contain a set of animated stickers, one for each of the supported emojis. </p>
<p>Clients should substitute messages containing only one instance of one of the allowed emojis with the respective animated sticker. </p>
<p>Animated emojis should loop only once when first sent or received, or when clicked. </p>
<p>For special <a href="/api/dice">dice emojis</a> like <img class="emoji" src="//telegram.org/img/emoji/40/F09F8EB2.png" width="20" height="20" alt="🎲" />, <img class="emoji" src="//telegram.org/img/emoji/40/F09F8EAF.png" width="20" height="20" alt="🎯" />, or <img class="emoji" src="//telegram.org/img/emoji/40/F09F8F80.png" width="20" height="20" alt="🏀" />, clients are supposed to behave differently both when sending and receiving such emojis: <a href="/api/dice">click here for more info »</a>.</p>
<h3><a class="anchor" href="#emojis-with-sounds" id="emojis-with-sounds" name="emojis-with-sounds"><i class="anchor-icon"></i></a>Emojis with sounds</h3>
<p>Certained animated emojis should play sound when clicked, as specified by <a href="/api/config#client-configuration">server-side configuration</a>. </p>
<p>The returned JSON object will contain the following map, with a list of file IDs to download:</p>
<pre><code> "emojies_sounds": {
"\ud83c\udf83": {
"id": "4956223179606458539",
"access_hash": "-2107001400913062971",
"file_reference_base64": "AF-4ApC7ukC0UWEPZN0TeSJURe7T"
},
"\u26b0": {
"id": "4956223179606458540",
"access_hash": "-1498869544183595185",
"file_reference_base64": "AF-4ApCLKMGt96WCvLm58kbqZHd3"
},
"\ud83e\udddf\u200d\u2642": {
"id": "4960929110848176331",
"access_hash": "3986395821757915468",
"file_reference_base64": "AF-4ApAedNln3IMEHH-SUQuH8L9g"
},
}</code></pre>
<p>The <a href="/api/file_reference">file reference field</a> should be base64-decoded before <a href="/api/files">downloading the file</a></p></div>
</div>
</div>
</div>
<div class="footer_wrap">
<div class="footer_columns_wrap footer_desktop">
<div class="footer_column footer_column_telegram">
<h5>Telegram</h5>
<div class="footer_telegram_description"></div>
Telegram is a cloud-based mobile and desktop messaging app with a focus on security and speed.
</div>
<div class="footer_column">
<h5><a href="//telegram.org/faq">About</a></h5>
<ul>
<li><a href="//telegram.org/faq">FAQ</a></li>
<li><a href="//telegram.org/blog">Blog</a></li>
<li><a href="//telegram.org/jobs">Jobs</a></li>
</ul>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps#mobile-apps">Mobile Apps</a></h5>
<ul>
<li><a href="//telegram.org/dl/ios">iPhone/iPad</a></li>
<li><a href="//telegram.org/dl/android">Android</a></li>
<li><a href="//telegram.org/dl/wp">Windows Phone</a></li>
</ul>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps#desktop-apps">Desktop Apps</a></h5>
<ul>
<li><a href="//desktop.telegram.org/">PC/Mac/Linux</a></li>
<li><a href="//macos.telegram.org/">macOS</a></li>
<li><a href="//telegram.org/dl/web">Web-browser</a></li>
</ul>
</div>
<div class="footer_column footer_column_platform">
<h5><a href="/">Platform</a></h5>
<ul>
<li><a href="/api">API</a></li>
<li><a href="//translations.telegram.org/">Translations</a></li>
<li><a href="//instantview.telegram.org/">Instant View</a></li>
</ul>
</div>
</div>
<div class="footer_columns_wrap footer_mobile">
<div class="footer_column">
<h5><a href="//telegram.org/faq">About</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/blog">Blog</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps">Apps</a></h5>
</div>
<div class="footer_column">
<h5><a href="/">Platform</a></h5>
</div>
<div class="footer_column">
<h5><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)">Twitter</a></h5>
</div>
</div>
</div>
</div>
<script src="/js/main.js?42"></script>
<script>backToTopInit("Go up");
removePreloadInit();
</script>
</body>
</html>
<!-- page generated in 11.16ms -->

View file

@ -0,0 +1,209 @@
<!DOCTYPE html>
<html class="">
<head>
<meta charset="utf-8">
<title>User Authorization</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="How to register a user&#39;s phone to start using the API.">
<meta property="og:title" content="User Authorization">
<meta property="og:image" content="9ebfef6d534b708d3a">
<meta property="og:description" content="How to register a user&#39;s phone to start using the API.">
<link rel="shortcut icon" href="/favicon.ico?4" type="image/x-icon" />
<link href="/css/bootstrap.min.css?3" rel="stylesheet">
<link href="/css/telegram.css?212" rel="stylesheet" media="screen">
<style>
</style>
</head>
<body class="preload">
<div class="dev_page_wrap">
<div class="dev_page_head navbar navbar-static-top navbar-tg">
<div class="navbar-inner">
<div class="container clearfix">
<ul class="nav navbar-nav navbar-right hidden-xs"><li class="navbar-twitter"><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)"><i class="icon icon-twitter"></i><span> Twitter</span></a></li></ul>
<ul class="nav navbar-nav">
<li><a href="//telegram.org/">Home</a></li>
<li class="hidden-xs"><a href="//telegram.org/faq">FAQ</a></li>
<li class="hidden-xs"><a href="//telegram.org/apps">Apps</a></li>
<li class="active"><a href="/api">API</a></li>
<li class=""><a href="/mtproto">Protocol</a></li>
<li class=""><a href="/schema">Schema</a></li>
</ul>
</div>
</div>
</div>
<div class="container clearfix">
<div class="dev_page">
<div id="dev_page_content_wrap" class=" ">
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/api/auth" >User Authorization</a></li></ul></div>
<h1 id="dev_page_title">User Authorization</h1>
<div id="dev_page_content"><!-- scroll_nav -->
<p>Authorization is associated with a clients encryption key identifier: <strong>auth_key_id</strong>. No additional parameters need to be passed into methods following authorization. </p>
<p>To log in as a <a href="/bots">bot</a>, follow <a href="/api/bots">these instructions »</a>.</p>
<h3><a class="anchor" href="#sending-a-verification-code" id="sending-a-verification-code" name="sending-a-verification-code"><i class="anchor-icon"></i></a>Sending a verification code</h3>
<p>Example implementations: <a href="https://github.com/DrKLO/Telegram/blob/master/TMessagesProj/src/main/java/org/telegram/ui/LoginActivity.java">telegram for android</a>, <a href="https://github.com/tdlib/td/tree/master/td/telegram/SendCodeHelper.cpp">tdlib</a>.</p>
<p>To show a nicely formatted and validated phone number field, the <a href="/constructor/help.countriesList">help.countriesList</a> constructor can be obtained using the <a href="/method/help.getCountriesList">help.getCountriesList</a> method.<br>
The <a href="/constructor/help.countriesList">help.countriesList</a> config is then used as described <a href="/api/config#country-information-and-login-phone-patterns">here »</a>. </p>
<p>Authorization requires that a text message containing an authorization code first be sent to the users phone.<br>
This may be done using the <a href="/method/auth.sendCode">auth.sendCode</a> method.
The system will automatically choose how to send the authorization code; there are four possible ways the code can arrive:</p>
<ul>
<li><a href="/constructor/auth.sentCodeTypeApp">Telegram code</a></li>
<li><a href="/constructor/auth.sentCodeTypeSms">SMS code</a></li>
<li><a href="/constructor/auth.sentCodeTypeCall">Phone call</a>: a synthesized voice will tell the user which verification code to input</li>
<li><a href="/constructor/auth.sentCodeTypeFlashCall">Flash phone call</a>: the code will be sent via a flash phone call, that will be closed immediately.
In the last case, the phone code will then be the phone number itself, just make sure that the phone number matches the specified pattern (see <a href="/constructor/auth.sentCodeTypeFlashCall">auth.sentCodeTypeFlashCall</a>).</li>
</ul>
<p>The <a href="/method/auth.sendCode">auth.sendCode</a> method also has parameters for enabling/disabling use of flash calls, and allows passing an SMS token that will be included in the sent SMS.
For example, the latter is required in newer versions of android, to use the <a href="https://developers.google.com/identity/sms-retriever/overview">android SMS receiver APIs</a>.</p>
<p>The returned <a href="/type/auth.SentCode">auth.SentCode</a> object will contain multiple parameters:</p>
<table class="table">
<tbody>
<tr>
<td><strong>flags</strong></td>
<td style="text-align: center;"><a href="/type/%23">#</a></td>
<td>Flags, see <a href="/mtproto/TL-combinators#conditional-fields">TL conditional fields</a></td>
</tr>
<tr>
<td><strong>type</strong></td>
<td style="text-align: center;"><a href="/type/auth.SentCodeType">auth.SentCodeType</a></td>
<td>Phone code type</td>
</tr>
<tr>
<td><strong>phone_code_hash</strong></td>
<td style="text-align: center;"><a href="/type/string">string</a></td>
<td>Phone code hash, to be stored and later re-used with <a href="/method/auth.signIn">auth.signIn</a></td>
</tr>
<tr>
<td><strong>next_type</strong></td>
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.1?<a href="/type/auth.CodeType">auth.CodeType</a></td>
<td>Phone code type that will be sent next, if the phone code is not received within <code>timeout</code> seconds: to send it use <a href="/method/auth.resendCode">auth.resendCode</a></td>
</tr>
<tr>
<td><strong>timeout</strong></td>
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.2?<a href="/type/int">int</a></td>
<td>Timeout for reception of the phone code</td>
</tr>
</tbody>
</table>
<p>If the message takes too long (<code>timeout</code> seconds) to arrive at the phone, the <a href="/method/auth.resendCode">auth.resendCode</a> method may be invoked to resend a code of type <code>next_type</code>.
If the same happens again, you can use <a href="/method/auth.resendCode">auth.resendCode</a> with the <code>next_type</code> returned by the previous call to <a href="/method/auth.resendCode">auth.resendCode</a>.
To cancel the verification code use <a href="/method/auth.cancelCode">auth.cancelCode</a>.</p>
<h3><a class="anchor" href="#sign-insign-up" id="sign-insign-up" name="sign-insign-up"><i class="anchor-icon"></i></a>Sign in/sign up</h3>
<p>When user enters verification code, the <a href="/method/auth.signIn">auth.signIn</a> method must be used to validate it and possibly sign user in.</p>
<p>If the code was entered correctly, but the method returns <a href="/constructor/auth.authorizationSignUpRequired">auth.authorizationSignUpRequired</a>, it means that account with this phone number doesn't exist yet: user needs to provide basic information, accept terms of service and then the new user registration method (<a href="/method/auth.signUp">auth.signUp</a>) must be invoked.</p>
<h3><a class="anchor" href="#2fa" id="2fa" name="2fa"><i class="anchor-icon"></i></a>2FA</h3>
<p>When trying to sign in using <a href="/method/auth.signIn">auth.signIn</a>, an <a href="/method/auth.signIn#possible-errors">error 400 SESSION_PASSWORD_NEEDED</a> may be returned, if the user has two-factor authentication enabled.
In this case, instructions for <a href="/api/srp">SRP 2FA authentication</a> must be followed.</p>
<p>To set up two-factor authorization on an already authorized account, follow the <a href="/api/srp">SRP 2FA authentication docs</a>.</p>
<h4><a class="anchor" href="#test-phone-numbers" id="test-phone-numbers" name="test-phone-numbers"><i class="anchor-icon"></i></a>Test Phone Numbers</h4>
<p>Each phone number is limited to only a certain amount of logins per day (e.g. 5, but this is subject to change) after which the API will return a FLOOD error until the next day. This might not be enough for testing the implementation of User Authorization flows in client applications.</p>
<p>There are several reserved phone number prefixes for testing that your application handles redirects between DCs, sign up, sign in and 2FA flows correctly. These numbers are only available on <strong>Test DCs</strong> (their IP addresses for TCP transport are availble in <a href="https://my.telegram.org/apps">API development tools</a> panel after <a href="https://core.telegram.org/api/obtaining_api_id#obtaining-api-id">api_id was obtained</a>, <a href="https://core.telegram.org/mtproto/transports#uri-format">URI format</a> for HTTPS/Websocket transport).</p>
<p>If you wish to emulate an application of a user associated with DC number X, it is sufficient to specify the phone number as <code>99966XYYYY</code>, where YYYY are random numbers, when registering the user. A user like this would always get XXXXX as the login confirmation code (the DC number, repeated five times). Note that the value of X must be in the range of 1-3 because there are only 3 Test DCs. When the flood limit is reached for any particular test number, just choose another number (changing the YYYY random part).</p>
<p>Do not store any important or private information in the messages of such test accounts; anyone can make use of the simplified authorization mechanism and we periodically wipe all information stored there.</p>
<p>Proceed with User Authorization flows in <strong>Production DCs</strong> only after you make sure everything works correctly on <strong>Test DCs</strong> first to avoid reaching flood limits.</p>
<blockquote>
<p>To help you with working on production DCs, logins with the same phone number with which the <code>api_id</code> was registered have more generous flood limits.</p>
</blockquote>
<h3><a class="anchor" href="#we-are-authorized" id="we-are-authorized" name="we-are-authorized"><i class="anchor-icon"></i></a>We are authorized</h3>
<p>As a result of authorization, the client key, <strong>auth_key_id</strong>, becomes associated with the user, and each subsequent API call with this key will be executed with that users identity. The authorization method itself returns the relevant user. It is best to immediately store the User ID locally in a binding with the key.</p>
<p>Only a small portion of the API methods are available to <strong>unauthorized</strong> users:</p>
<ul>
<li><a href="/method/auth.sendCode">auth.sendCode</a></li>
<li><a href="/method/auth.resendCode">auth.resendCode</a></li>
<li><a href="/method/account.getPassword">account.getPassword</a></li>
<li><a href="/method/auth.checkPassword">auth.checkPassword</a></li>
<li><a href="/method/auth.checkPhone">auth.checkPhone</a></li>
<li><a href="/method/auth.signUp">auth.signUp</a></li>
<li><a href="/method/auth.signIn">auth.signIn</a></li>
<li><a href="/method/auth.importAuthorization">auth.importAuthorization</a></li>
<li><a href="/method/help.getConfig">help.getConfig</a></li>
<li><a href="/method/help.getNearestDc">help.getNearestDc</a></li>
<li><a href="/method/help.getAppUpdate">help.getAppUpdate</a></li>
<li><a href="/method/help.getCdnConfig">help.getCdnConfig</a></li>
<li><a href="/method/langpack.getLangPack">langpack.getLangPack</a></li>
<li><a href="/method/langpack.getStrings">langpack.getStrings</a></li>
<li><a href="/method/langpack.getDifference">langpack.getDifference</a></li>
<li><a href="/method/langpack.getLanguages">langpack.getLanguages</a></li>
<li><a href="/method/langpack.getLanguage">langpack.getLanguage</a></li>
</ul>
<p>Other methods will result in an error: <a href="/api/errors#401-unauthorized"><strong>401 UNAUTHORIZED</strong></a>.</p></div>
</div>
</div>
</div>
<div class="footer_wrap">
<div class="footer_columns_wrap footer_desktop">
<div class="footer_column footer_column_telegram">
<h5>Telegram</h5>
<div class="footer_telegram_description"></div>
Telegram is a cloud-based mobile and desktop messaging app with a focus on security and speed.
</div>
<div class="footer_column">
<h5><a href="//telegram.org/faq">About</a></h5>
<ul>
<li><a href="//telegram.org/faq">FAQ</a></li>
<li><a href="//telegram.org/blog">Blog</a></li>
<li><a href="//telegram.org/jobs">Jobs</a></li>
</ul>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps#mobile-apps">Mobile Apps</a></h5>
<ul>
<li><a href="//telegram.org/dl/ios">iPhone/iPad</a></li>
<li><a href="//telegram.org/dl/android">Android</a></li>
<li><a href="//telegram.org/dl/wp">Windows Phone</a></li>
</ul>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps#desktop-apps">Desktop Apps</a></h5>
<ul>
<li><a href="//desktop.telegram.org/">PC/Mac/Linux</a></li>
<li><a href="//macos.telegram.org/">macOS</a></li>
<li><a href="//telegram.org/dl/web">Web-browser</a></li>
</ul>
</div>
<div class="footer_column footer_column_platform">
<h5><a href="/">Platform</a></h5>
<ul>
<li><a href="/api">API</a></li>
<li><a href="//translations.telegram.org/">Translations</a></li>
<li><a href="//instantview.telegram.org/">Instant View</a></li>
</ul>
</div>
</div>
<div class="footer_columns_wrap footer_mobile">
<div class="footer_column">
<h5><a href="//telegram.org/faq">About</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/blog">Blog</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps">Apps</a></h5>
</div>
<div class="footer_column">
<h5><a href="/">Platform</a></h5>
</div>
<div class="footer_column">
<h5><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)">Twitter</a></h5>
</div>
</div>
</div>
</div>
<script src="/js/main.js?42"></script>
<script src="/js/jquery.min.js?1"></script>
<script src="/js/bootstrap.min.js"></script>
<script>window.initDevPageNav&&initDevPageNav();
backToTopInit("Go up");
removePreloadInit();
</script>
</body>
</html>
<!-- page generated in 20.5ms -->

View file

@ -0,0 +1,142 @@
<!DOCTYPE html>
<html class="">
<head>
<meta charset="utf-8">
<title>Bots</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="Working with bots, using the MTProto API.
See here for more info about bots.
Please note that you can also use the simplified…">
<meta property="og:title" content="Bots">
<meta property="og:image" content="">
<meta property="og:description" content="Working with bots, using the MTProto API.
See here for more info about bots.
Please note that you can also use the simplified…">
<link rel="shortcut icon" href="/favicon.ico?4" type="image/x-icon" />
<link href="/css/bootstrap.min.css?3" rel="stylesheet">
<link href="/css/telegram.css?212" rel="stylesheet" media="screen">
<style>
</style>
</head>
<body class="preload">
<div class="dev_page_wrap">
<div class="dev_page_head navbar navbar-static-top navbar-tg">
<div class="navbar-inner">
<div class="container clearfix">
<ul class="nav navbar-nav navbar-right hidden-xs"><li class="navbar-twitter"><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)"><i class="icon icon-twitter"></i><span> Twitter</span></a></li></ul>
<ul class="nav navbar-nav">
<li><a href="//telegram.org/">Home</a></li>
<li class="hidden-xs"><a href="//telegram.org/faq">FAQ</a></li>
<li class="hidden-xs"><a href="//telegram.org/apps">Apps</a></li>
<li class="active"><a href="/api">API</a></li>
<li class=""><a href="/mtproto">Protocol</a></li>
<li class=""><a href="/schema">Schema</a></li>
</ul>
</div>
</div>
</div>
<div class="container clearfix">
<div class="dev_page">
<div id="dev_page_content_wrap" class=" ">
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/api/bots" >Bots</a></li></ul></div>
<h1 id="dev_page_title">Bots</h1>
<div id="dev_page_content"><!-- scroll_nav -->
<p>Working with bots, using the MTProto API.</p>
<p>See <a href="/bots">here</a> for more info about bots. </p>
<p>Please note that you can also use the simplified <a href="/bots/api">HTTP Bot API</a> to use bots, see <a href="/bots">here for more info »</a>.</p>
<h3><a class="anchor" href="#login" id="login" name="login"><i class="anchor-icon"></i></a>Login</h3>
<pre><code>---functions---
<a href='/method/auth.importBotAuthorization'>auth.importBotAuthorization</a>#67a3ff2c flags:<a href='/type/int'>int</a> api_id:<a href='/type/int'>int</a> api_hash:<a href='/type/string'>string</a> bot_auth_token:<a href='/type/string'>string</a> = <a href='/type/auth.Authorization'>auth.Authorization</a>;</code></pre>
<p>In order to login as a bot, instead of using the <a href="/api/auth">standard login code flow</a>, simply provide the <a href="/bots#creating-a-new-bot">bot token</a> generated by <a href="https://t.me/botfather">@botfather</a>.<br>
You must still provide your <a href="/api/obtaining_api_id#obtaining-api-id">API ID</a>, as per user logins. </p>
<p>After successful authorization, you will be able to use <a href="/methods">most MTProto API methods</a>, just as any normal user.<br>
Methods that can be called by bots will have a <strong>Bots can use this method</strong> notice. </p>
<h3><a class="anchor" href="#commands" id="commands" name="commands"><i class="anchor-icon"></i></a><a href="/api/bots/commands">Commands</a></h3>
<p><a href="/bots">Bots</a> offer a set of commands that can be used by users in private, or in a chat. </p>
<h3><a class="anchor" href="#buttons" id="buttons" name="buttons"><i class="anchor-icon"></i></a><a href="/api/bots/buttons">Buttons</a></h3>
<p>Users can interact with your bot via <strong>buttons</strong> or even <strong>inline buttons</strong>, straight from inline <strong>messages</strong> in <strong>any</strong> chat. </p>
<h3><a class="anchor" href="#inline-queries" id="inline-queries" name="inline-queries"><i class="anchor-icon"></i></a><a href="/api/bots/inline">Inline queries</a></h3>
<p>Users can interact with your bot via <strong>inline queries</strong>, straight from the <strong>text input field</strong> in <strong>any</strong> chat. </p>
<h3><a class="anchor" href="#games" id="games" name="games"><i class="anchor-icon"></i></a><a href="/api/bots/games">Games</a></h3>
<p>Bots can offer users HTML5 games to play solo or to compete against each other in groups and one-on-one chats; how to work with games in the MTProto API.</p></div>
</div>
</div>
</div>
<div class="footer_wrap">
<div class="footer_columns_wrap footer_desktop">
<div class="footer_column footer_column_telegram">
<h5>Telegram</h5>
<div class="footer_telegram_description"></div>
Telegram is a cloud-based mobile and desktop messaging app with a focus on security and speed.
</div>
<div class="footer_column">
<h5><a href="//telegram.org/faq">About</a></h5>
<ul>
<li><a href="//telegram.org/faq">FAQ</a></li>
<li><a href="//telegram.org/blog">Blog</a></li>
<li><a href="//telegram.org/jobs">Jobs</a></li>
</ul>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps#mobile-apps">Mobile Apps</a></h5>
<ul>
<li><a href="//telegram.org/dl/ios">iPhone/iPad</a></li>
<li><a href="//telegram.org/dl/android">Android</a></li>
<li><a href="//telegram.org/dl/wp">Windows Phone</a></li>
</ul>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps#desktop-apps">Desktop Apps</a></h5>
<ul>
<li><a href="//desktop.telegram.org/">PC/Mac/Linux</a></li>
<li><a href="//macos.telegram.org/">macOS</a></li>
<li><a href="//telegram.org/dl/web">Web-browser</a></li>
</ul>
</div>
<div class="footer_column footer_column_platform">
<h5><a href="/">Platform</a></h5>
<ul>
<li><a href="/api">API</a></li>
<li><a href="//translations.telegram.org/">Translations</a></li>
<li><a href="//instantview.telegram.org/">Instant View</a></li>
</ul>
</div>
</div>
<div class="footer_columns_wrap footer_mobile">
<div class="footer_column">
<h5><a href="//telegram.org/faq">About</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/blog">Blog</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps">Apps</a></h5>
</div>
<div class="footer_column">
<h5><a href="/">Platform</a></h5>
</div>
<div class="footer_column">
<h5><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)">Twitter</a></h5>
</div>
</div>
</div>
</div>
<script src="/js/main.js?42"></script>
<script src="/js/jquery.min.js?1"></script>
<script src="/js/bootstrap.min.js"></script>
<script>window.initDevPageNav&&initDevPageNav();
backToTopInit("Go up");
removePreloadInit();
</script>
</body>
</html>
<!-- page generated in 16.31ms -->

View file

@ -0,0 +1,242 @@
<!DOCTYPE html>
<html class="">
<head>
<meta charset="utf-8">
<title>Buttons</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="Users can interact with your bot via buttons or even inline buttons, straight from inline messages in any chat. ">
<meta property="og:title" content="Buttons">
<meta property="og:image" content="">
<meta property="og:description" content="Users can interact with your bot via buttons or even inline buttons, straight from inline messages in any chat. ">
<link rel="shortcut icon" href="/favicon.ico?4" type="image/x-icon" />
<link href="/css/bootstrap.min.css?3" rel="stylesheet">
<link href="/css/telegram.css?212" rel="stylesheet" media="screen">
<style>
</style>
</head>
<body class="preload">
<div class="dev_page_wrap">
<div class="dev_page_head navbar navbar-static-top navbar-tg">
<div class="navbar-inner">
<div class="container clearfix">
<ul class="nav navbar-nav navbar-right hidden-xs"><li class="navbar-twitter"><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)"><i class="icon icon-twitter"></i><span> Twitter</span></a></li></ul>
<ul class="nav navbar-nav">
<li><a href="//telegram.org/">Home</a></li>
<li class="hidden-xs"><a href="//telegram.org/faq">FAQ</a></li>
<li class="hidden-xs"><a href="//telegram.org/apps">Apps</a></li>
<li class="active"><a href="/api">API</a></li>
<li class=""><a href="/mtproto">Protocol</a></li>
<li class=""><a href="/schema">Schema</a></li>
</ul>
</div>
</div>
</div>
<div class="container clearfix">
<div class="dev_page">
<div id="dev_page_content_wrap" class=" ">
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/api/bots%2Fbuttons" >Buttons</a></li></ul></div>
<h1 id="dev_page_title">Buttons</h1>
<div id="dev_page_content"><!-- scroll_nav -->
<p>Users can interact with your bot via <strong>buttons</strong> or even <strong>inline buttons</strong>, straight from inline <strong>messages</strong> in <strong>any</strong> chat.<br>
This article describes the full button flow, using the MTProto API. </p>
<p>For a simplified description using the HTTP bot API, see <a href="/bots/#inline-keyboards-and-on-the-fly-updating">here »</a>. </p>
<h3><a class="anchor" href="#buttons" id="buttons" name="buttons"><i class="anchor-icon"></i></a>Buttons</h3>
<pre><code><a href='/constructor/keyboardButton'>keyboardButton</a>#a2fa4880 text:<a href='/type/string'>string</a> = <a href='/type/KeyboardButton'>KeyboardButton</a>;
<a href='/constructor/keyboardButtonUrl'>keyboardButtonUrl</a>#258aff05 text:<a href='/type/string'>string</a> url:<a href='/type/string'>string</a> = <a href='/type/KeyboardButton'>KeyboardButton</a>;
<a href='/constructor/keyboardButtonCallback'>keyboardButtonCallback</a>#35bbdb6b flags:<a href='/type/%23'>#</a> requires_password:flags.0?<a href='/constructor/true'>true</a> text:<a href='/type/string'>string</a> data:<a href='/type/bytes'>bytes</a> = <a href='/type/KeyboardButton'>KeyboardButton</a>;
<a href='/constructor/keyboardButtonRequestPhone'>keyboardButtonRequestPhone</a>#b16a6c29 text:<a href='/type/string'>string</a> = <a href='/type/KeyboardButton'>KeyboardButton</a>;
<a href='/constructor/keyboardButtonRequestGeoLocation'>keyboardButtonRequestGeoLocation</a>#fc796b3f text:<a href='/type/string'>string</a> = <a href='/type/KeyboardButton'>KeyboardButton</a>;
<a href='/constructor/keyboardButtonSwitchInline'>keyboardButtonSwitchInline</a>#568a748 flags:<a href='/type/%23'>#</a> same_peer:flags.0?<a href='/constructor/true'>true</a> text:<a href='/type/string'>string</a> query:<a href='/type/string'>string</a> = <a href='/type/KeyboardButton'>KeyboardButton</a>;
<a href='/constructor/keyboardButtonGame'>keyboardButtonGame</a>#50f41ccf text:<a href='/type/string'>string</a> = <a href='/type/KeyboardButton'>KeyboardButton</a>;
<a href='/constructor/keyboardButtonBuy'>keyboardButtonBuy</a>#afd93fbb text:<a href='/type/string'>string</a> = <a href='/type/KeyboardButton'>KeyboardButton</a>;
<a href='/constructor/keyboardButtonUrlAuth'>keyboardButtonUrlAuth</a>#10b78d29 flags:<a href='/type/%23'>#</a> text:<a href='/type/string'>string</a> fwd_text:flags.0?<a href='/type/string'>string</a> url:<a href='/type/string'>string</a> button_id:<a href='/type/int'>int</a> = <a href='/type/KeyboardButton'>KeyboardButton</a>;
<a href='/constructor/inputKeyboardButtonUrlAuth'>inputKeyboardButtonUrlAuth</a>#d02e7fd4 flags:<a href='/type/%23'>#</a> request_write_access:flags.0?<a href='/constructor/true'>true</a> text:<a href='/type/string'>string</a> fwd_text:flags.1?<a href='/type/string'>string</a> url:<a href='/type/string'>string</a> bot:<a href='/type/InputUser'>InputUser</a> = <a href='/type/KeyboardButton'>KeyboardButton</a>;
<a href='/constructor/keyboardButtonRequestPoll'>keyboardButtonRequestPoll</a>#bbc7515d flags:<a href='/type/%23'>#</a> quiz:flags.0?<a href='/type/Bool'>Bool</a> text:<a href='/type/string'>string</a> = <a href='/type/KeyboardButton'>KeyboardButton</a>;
<a href='/constructor/keyboardButtonRow'>keyboardButtonRow</a>#77608b83 buttons:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/KeyboardButton'>KeyboardButton</a>&gt; = <a href='/type/KeyboardButtonRow'>KeyboardButtonRow</a>;
<a href='/constructor/replyKeyboardHide'>replyKeyboardHide</a>#a03e5b85 flags:<a href='/type/%23'>#</a> selective:flags.2?<a href='/constructor/true'>true</a> = <a href='/type/ReplyMarkup'>ReplyMarkup</a>;
<a href='/constructor/replyKeyboardForceReply'>replyKeyboardForceReply</a>#f4108aa0 flags:<a href='/type/%23'>#</a> single_use:flags.1?<a href='/constructor/true'>true</a> selective:flags.2?<a href='/constructor/true'>true</a> = <a href='/type/ReplyMarkup'>ReplyMarkup</a>;
<a href='/constructor/replyKeyboardMarkup'>replyKeyboardMarkup</a>#3502758c flags:<a href='/type/%23'>#</a> resize:flags.0?<a href='/constructor/true'>true</a> single_use:flags.1?<a href='/constructor/true'>true</a> selective:flags.2?<a href='/constructor/true'>true</a> rows:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/KeyboardButtonRow'>KeyboardButtonRow</a>&gt; = <a href='/type/ReplyMarkup'>ReplyMarkup</a>;
<a href='/constructor/replyInlineMarkup'>replyInlineMarkup</a>#48a30254 rows:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/KeyboardButtonRow'>KeyboardButtonRow</a>&gt; = <a href='/type/ReplyMarkup'>ReplyMarkup</a>;
<a href='/constructor/message'>message</a>#58ae39c9 flags:<a href='/type/%23'>#</a> out:flags.1?<a href='/constructor/true'>true</a> mentioned:flags.4?<a href='/constructor/true'>true</a> media_unread:flags.5?<a href='/constructor/true'>true</a> silent:flags.13?<a href='/constructor/true'>true</a> post:flags.14?<a href='/constructor/true'>true</a> from_scheduled:flags.18?<a href='/constructor/true'>true</a> legacy:flags.19?<a href='/constructor/true'>true</a> edit_hide:flags.21?<a href='/constructor/true'>true</a> pinned:flags.24?<a href='/constructor/true'>true</a> id:<a href='/type/int'>int</a> from_id:flags.8?<a href='/type/Peer'>Peer</a> peer_id:<a href='/type/Peer'>Peer</a> fwd_from:flags.2?<a href='/type/MessageFwdHeader'>MessageFwdHeader</a> via_bot_id:flags.11?<a href='/type/int'>int</a> reply_to:flags.3?<a href='/type/MessageReplyHeader'>MessageReplyHeader</a> date:<a href='/type/int'>int</a> message:<a href='/type/string'>string</a> media:flags.9?<a href='/type/MessageMedia'>MessageMedia</a> reply_markup:flags.6?<a href='/type/ReplyMarkup'>ReplyMarkup</a> entities:flags.7?<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/MessageEntity'>MessageEntity</a>&gt; views:flags.10?<a href='/type/int'>int</a> forwards:flags.10?<a href='/type/int'>int</a> replies:flags.23?<a href='/type/MessageReplies'>MessageReplies</a> edit_date:flags.15?<a href='/type/int'>int</a> post_author:flags.16?<a href='/type/string'>string</a> grouped_id:flags.17?<a href='/type/long'>long</a> restriction_reason:flags.22?<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/RestrictionReason'>RestrictionReason</a>&gt; = <a href='/type/Message'>Message</a>;
---functions---
<a href='/method/messages.sendMessage'>messages.sendMessage</a>#520c3870 flags:<a href='/type/%23'>#</a> no_webpage:flags.1?<a href='/constructor/true'>true</a> silent:flags.5?<a href='/constructor/true'>true</a> background:flags.6?<a href='/constructor/true'>true</a> clear_draft:flags.7?<a href='/constructor/true'>true</a> peer:<a href='/type/InputPeer'>InputPeer</a> reply_to_msg_id:flags.0?<a href='/type/int'>int</a> message:<a href='/type/string'>string</a> random_id:<a href='/type/long'>long</a> reply_markup:flags.2?<a href='/type/ReplyMarkup'>ReplyMarkup</a> entities:flags.3?<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/MessageEntity'>MessageEntity</a>&gt; schedule_date:flags.10?<a href='/type/int'>int</a> = <a href='/type/Updates'>Updates</a>;</code></pre>
<p>Bots can attach a <a href="/type/ReplyMarkup">ReplyMarkup</a> constructor to outgoing messages, to attach an <a href="/bots#inline-keyboards-and-on-the-fly-updating">inline keyboard</a> or a <a href="/bots#keyboards">custom reply keyboard</a>:</p>
<ul>
<li><a href="/constructor/replyKeyboardMarkup">replyKeyboardMarkup</a> - Sends a <a href="/bots#keyboards">custom reply keyboard</a>. <br> User clients receiving such a constructor should display a <a href="/bots#keyboards">special keyboard</a> with custom reply options.</li>
<li><a href="/constructor/replyKeyboardHide">replyKeyboardHide</a> - Hides the <a href="/bots#keyboards">custom reply keyboard</a>. <br> User clients receiving this constructor should hide the <a href="/bots#keyboards">custom reply keyboard</a> opened by <a href="/constructor/replyKeyboardMarkup">replyKeyboardMarkup</a></li>
<li><a href="/constructor/replyKeyboardForceReply">replyKeyboardForceReply</a> - Sends a <a href="/bots/api#forcereply">force reply</a> constructor <br> User clients receiving a message with this constructor should act as if the user had clicked on the reply button of the message, displaying the reply UI. </li>
<li><a href="/constructor/replyInlineMarkup">replyInlineMarkup</a> - Attaches an <a href="/bots#inline-keyboards-and-on-the-fly-updating">inline keyboard</a> to the message, allowing users to send callback data to the bot without sending actual messages to the current chat, see <a href="/bots#pressing-buttons">here for more info »</a>. </li>
</ul>
<h3><a class="anchor" href="#pressing-buttons" id="pressing-buttons" name="pressing-buttons"><i class="anchor-icon"></i></a>Pressing buttons</h3>
<pre><code><a href='/constructor/keyboardButton'>keyboardButton</a>#a2fa4880 text:<a href='/type/string'>string</a> = <a href='/type/KeyboardButton'>KeyboardButton</a>;
<a href='/constructor/keyboardButtonUrl'>keyboardButtonUrl</a>#258aff05 text:<a href='/type/string'>string</a> url:<a href='/type/string'>string</a> = <a href='/type/KeyboardButton'>KeyboardButton</a>;
<a href='/constructor/keyboardButtonCallback'>keyboardButtonCallback</a>#35bbdb6b flags:<a href='/type/%23'>#</a> requires_password:flags.0?<a href='/constructor/true'>true</a> text:<a href='/type/string'>string</a> data:<a href='/type/bytes'>bytes</a> = <a href='/type/KeyboardButton'>KeyboardButton</a>;
<a href='/constructor/keyboardButtonRequestPhone'>keyboardButtonRequestPhone</a>#b16a6c29 text:<a href='/type/string'>string</a> = <a href='/type/KeyboardButton'>KeyboardButton</a>;
<a href='/constructor/keyboardButtonRequestGeoLocation'>keyboardButtonRequestGeoLocation</a>#fc796b3f text:<a href='/type/string'>string</a> = <a href='/type/KeyboardButton'>KeyboardButton</a>;
<a href='/constructor/keyboardButtonRequestPoll'>keyboardButtonRequestPoll</a>#bbc7515d flags:<a href='/type/%23'>#</a> quiz:flags.0?<a href='/type/Bool'>Bool</a> text:<a href='/type/string'>string</a> = <a href='/type/KeyboardButton'>KeyboardButton</a>;
<a href='/constructor/keyboardButtonSwitchInline'>keyboardButtonSwitchInline</a>#568a748 flags:<a href='/type/%23'>#</a> same_peer:flags.0?<a href='/constructor/true'>true</a> text:<a href='/type/string'>string</a> query:<a href='/type/string'>string</a> = <a href='/type/KeyboardButton'>KeyboardButton</a>;
<a href='/constructor/keyboardButtonGame'>keyboardButtonGame</a>#50f41ccf text:<a href='/type/string'>string</a> = <a href='/type/KeyboardButton'>KeyboardButton</a>;
<a href='/constructor/keyboardButtonBuy'>keyboardButtonBuy</a>#afd93fbb text:<a href='/type/string'>string</a> = <a href='/type/KeyboardButton'>KeyboardButton</a>;
<a href='/constructor/keyboardButtonUrlAuth'>keyboardButtonUrlAuth</a>#10b78d29 flags:<a href='/type/%23'>#</a> text:<a href='/type/string'>string</a> fwd_text:flags.0?<a href='/type/string'>string</a> url:<a href='/type/string'>string</a> button_id:<a href='/type/int'>int</a> = <a href='/type/KeyboardButton'>KeyboardButton</a>;
// Used by bots to send a keyboardButtonUrlAuth
<a href='/constructor/inputKeyboardButtonUrlAuth'>inputKeyboardButtonUrlAuth</a>#d02e7fd4 flags:<a href='/type/%23'>#</a> request_write_access:flags.0?<a href='/constructor/true'>true</a> text:<a href='/type/string'>string</a> fwd_text:flags.1?<a href='/type/string'>string</a> url:<a href='/type/string'>string</a> bot:<a href='/type/InputUser'>InputUser</a> = <a href='/type/KeyboardButton'>KeyboardButton</a>;
<a href='/constructor/keyboardButtonRow'>keyboardButtonRow</a>#77608b83 buttons:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/KeyboardButton'>KeyboardButton</a>&gt; = <a href='/type/KeyboardButtonRow'>KeyboardButtonRow</a>;</code></pre>
<p>Both <a href="/bots#keyboards">reply</a> and <a href="/bots#inline-keyboards-and-on-the-fly-updating">inline</a> keyboards are composed of a vector of <a href="/constructor/keyboardButtonRow">rows</a>, each row containing a vector of <a href="/type/KeyboardButton">buttons</a>, for each column.<br>
Each row can have a different number of columns, and user clients should properly handle clicking buttons of every type. </p>
<p>Buttons available only in reply keyboards:</p>
<ul>
<li><a href="/constructor/keyboardButton">keyboardButton</a> - Send a message to the chat, replying to the message that attached the <a href="/bots#keyboard">reply keyboard</a></li>
<li><a href="/constructor/keyboardButtonRequestPhone">keyboardButtonRequestPhone</a> - Only in private chats, send the current user's contact to the chat, replying to the message that attached the <a href="/bots#keyboard">reply keyboard</a></li>
<li><a href="/constructor/keyboardButtonRequestGeoLocation">keyboardButtonRequestGeoLocation</a> - Only in private chats, send the current user's geolocation to the chat, replying to the message that attached the <a href="/bots#keyboard">reply keyboard</a></li>
<li><a href="/constructor/keyboardButtonRequestPoll">keyboardButtonRequestPoll</a> - Only in private chats, prompt the user to create and send a <a href="/api/poll">poll</a> (or a quiz poll, depending on the <code>quiz</code> flag), replying to the message that attached the <a href="/bots#keyboard">reply keyboard</a></li>
</ul>
<p>Buttons available only in inline keyboards:</p>
<ul>
<li><a href="/constructor/keyboardButtonUrl">keyboardButtonUrl</a> - Open the URL, showing a "Do you want to open this URL?" prompt (unless the URL is one of the <a href="https://github.com/DrKLO/Telegram/blob/002c01ecd37cd08ed07b3ed84d79318d091dfc85/TMessagesProj/src/main/java/org/telegram/messenger/browser/Browser.java#L351">internal URIs</a>, in which case the URL should be opened right away)</li>
<li><a href="/constructor/keyboardButtonCallback">keyboardButtonCallback</a> - Send the callback data to the bot, optionally providing the user's 2FA SRP payload for identity verification, see <a href="#callback-queries">here for more info »</a></li>
<li><a href="/constructor/keyboardButtonSwitchInline">keyboardButtonSwitchInline</a><ul>
<li>If <code>keyboardButtonSwitchInline.same_peer</code> is set, insert the bot's username and <code>keyboardButtonSwitchInline.query</code> in the current chat's input field, triggering an <a href="/api/bots/inline">inline query</a>.</li>
<li>If <code>keyboardButtonSwitchInline.same_peer</code> is not set, prompt the user to select one of their chats, and then insert the bot's username and <code>keyboardButtonSwitchInline.query</code> in the current chat's input field, triggering an <a href="/api/bots/inline">inline query</a>.</li>
</ul>
</li>
<li><a href="/constructor/keyboardButtonGame">keyboardButtonGame</a> - Open the <a href="/constructor/game">game</a> from the attached <a href="/constructor/messageMediaGame">messageMediaGame</a> constructor, for more info <a href="/api/bots/games">see here »</a></li>
<li><a href="/constructor/keyboardButtonBuy">keyboardButtonBuy</a> - Proceed to initiating the payment flow, for more info <a href="/api/payments">see here »</a></li>
<li><a href="/constructor/keyboardButtonUrlAuth">keyboardButtonUrlAuth</a> - Log into a website using the user's Telegram account, as specified <a href="/api/url-authorization">here »</a></li>
</ul>
<h3><a class="anchor" href="#callback-queries" id="callback-queries" name="callback-queries"><i class="anchor-icon"></i></a>Callback queries</h3>
<p><a href="/constructor/keyboardButtonCallback">keyboardButtonCallback</a> buttons can be used to send the specified <code>data</code> payload back to the bot, when they are clicked.<br>
Additionally, a bot can verify a user's identity by requiring they verify their 2FA password with <a href="/api/srp">SRP</a>. </p>
<h4><a class="anchor" href="#sending-a-callback-query" id="sending-a-callback-query" name="sending-a-callback-query"><i class="anchor-icon"></i></a>Sending a callback query</h4>
<pre><code><a href='/constructor/keyboardButtonGame'>keyboardButtonGame</a>#50f41ccf text:<a href='/type/string'>string</a> = <a href='/type/KeyboardButton'>KeyboardButton</a>;
<a href='/constructor/keyboardButtonCallback'>keyboardButtonCallback</a>#35bbdb6b flags:<a href='/type/%23'>#</a> requires_password:flags.0?<a href='/constructor/true'>true</a> text:<a href='/type/string'>string</a> data:<a href='/type/bytes'>bytes</a> = <a href='/type/KeyboardButton'>KeyboardButton</a>;
<a href='/constructor/messages.botCallbackAnswer'>messages.botCallbackAnswer</a>#36585ea4 flags:<a href='/type/%23'>#</a> alert:flags.1?<a href='/constructor/true'>true</a> has_url:flags.3?<a href='/constructor/true'>true</a> native_ui:flags.4?<a href='/constructor/true'>true</a> message:flags.0?<a href='/type/string'>string</a> url:flags.2?<a href='/type/string'>string</a> cache_time:<a href='/type/int'>int</a> = <a href='/type/messages.BotCallbackAnswer'>messages.BotCallbackAnswer</a>;
---functions---
<a href='/method/messages.getBotCallbackAnswer'>messages.getBotCallbackAnswer</a>#9342ca07 flags:<a href='/type/%23'>#</a> game:flags.1?<a href='/constructor/true'>true</a> peer:<a href='/type/InputPeer'>InputPeer</a> msg_id:<a href='/type/int'>int</a> data:flags.0?<a href='/type/bytes'>bytes</a> password:flags.2?<a href='/type/InputCheckPasswordSRP'>InputCheckPasswordSRP</a> = <a href='/type/messages.BotCallbackAnswer'>messages.BotCallbackAnswer</a>;</code></pre>
<p>When the user clicks on a <a href="/constructor/keyboardButtonCallback">keyboardButtonCallback</a> in a message sent by a bot, or generated by an <a href="/api/bots/inline">inline query</a>, <a href="/method/messages.getBotCallbackAnswer">messages.getBotCallbackAnswer</a> should be called, passing the peer and ID of the message.<br>
The same should happen when clicking on <a href="/constructor/keyboardButtonGame">keyboardButtonGame</a> buttons, with the difference that the <code>game</code> flag must be set instead of the <code>data</code> parameter. </p>
<p>Make sure to properly handle bot timeouts in the form of <code>BOT_RESPONSE_TIMEOUT</code> RPC errors, as the bot may be offline and unable to reply. </p>
<p>The returned <a href="/constructor/messages.botCallbackAnswer">messages.botCallbackAnswer</a> constructor contains:</p>
<ul>
<li><code>message</code> if specified, a message that should be shown in a non-blocking toast notification</li>
<li><code>alert</code> indicates whether the <code>message</code> should be shown as a dismissable prompt, instead of a simple toast notification</li>
<li><code>has_url</code> Whether an URL is present</li>
<li><code>url</code> if specified, the client should open the URL, without showing a confirmation prompt. <br> This is safe and allowed, because here, bots can only return: <ul>
<li>URLs to themselves with added query parameters (<code>t.me/bot?start=aaa</code>)</li>
<li>URLs to a valid game, if the bot has manually configured games, and the clicked button was a <a href="/constructor/keyboardButtonGame">keyboardButtonGame</a>. </li>
</ul>
</li>
<li><code>native_ui</code> whether to open game URLs in a WebView or in native UI.</li>
<li><code>cache_time</code> specifies for how long should this answer be cached, client-side</li>
</ul>
<h5><a class="anchor" href="#srp-verification" id="srp-verification" name="srp-verification"><i class="anchor-icon"></i></a>SRP verification</h5>
<p>If the <code>requires_password</code> flag is set, the <a href="/api/srp">SRP 2FA payload</a> must also be generated and attached to the query, to verify the identity of the user. </p>
<p><strong>Note that the bot will NOT be able to access your password or the SRP payload</strong>. </p>
<p>The SRP payload will be processed exclusively on the Telegram's servers, simply returning an RPC error without passing the query to the bot if the verification fails.<br>
This is just a way of verifying the identity of the user, mainly used by the official <a href="https://t.me/botfather">@botfather</a> bot to allow securely transferring the ownership of a bot to another user.</p>
<h4><a class="anchor" href="#answering-a-callback-query" id="answering-a-callback-query" name="answering-a-callback-query"><i class="anchor-icon"></i></a>Answering a callback query</h4>
<pre><code><a href='/constructor/updateBotCallbackQuery'>updateBotCallbackQuery</a>#e73547e1 flags:<a href='/type/%23'>#</a> query_id:<a href='/type/long'>long</a> user_id:<a href='/type/int'>int</a> peer:<a href='/type/Peer'>Peer</a> msg_id:<a href='/type/int'>int</a> chat_instance:<a href='/type/long'>long</a> data:flags.0?<a href='/type/bytes'>bytes</a> game_short_name:flags.1?<a href='/type/string'>string</a> = <a href='/type/Update'>Update</a>;
<a href='/constructor/updateInlineBotCallbackQuery'>updateInlineBotCallbackQuery</a>#f9d27a5a flags:<a href='/type/%23'>#</a> query_id:<a href='/type/long'>long</a> user_id:<a href='/type/int'>int</a> msg_id:<a href='/type/InputBotInlineMessageID'>InputBotInlineMessageID</a> chat_instance:<a href='/type/long'>long</a> data:flags.0?<a href='/type/bytes'>bytes</a> game_short_name:flags.1?<a href='/type/string'>string</a> = <a href='/type/Update'>Update</a>;
---functions---
<a href='/method/messages.setBotCallbackAnswer'>messages.setBotCallbackAnswer</a>#d58f130a flags:<a href='/type/%23'>#</a> alert:flags.1?<a href='/constructor/true'>true</a> query_id:<a href='/type/long'>long</a> message:flags.0?<a href='/type/string'>string</a> url:flags.2?<a href='/type/string'>string</a> cache_time:<a href='/type/int'>int</a> = <a href='/type/Bool'>Bool</a>;</code></pre>
<p>After the user invokes <a href="/method/messages.getBotCallbackAnswer">messages.getBotCallbackAnswer</a>, an <a href="/constructor/updateBotCallbackQuery">updateBotCallbackQuery</a> or <a href="/constructor/updateInlineBotCallbackQuery">updateInlineBotCallbackQuery</a> is generated and sent to the bot, depending on whether the query originated from a normal message sent by the bot, or from a message sent from an <a href="/api/bots/inline">inline query</a>. </p>
<p>Either way, bots must reply to the query as quickly as possible using <a href="/method/messages.setBotCallbackAnswer">messages.setBotCallbackAnswer</a>: </p>
<ul>
<li><code>query_id</code> is the <code>query_id</code> from <a href="/method/messages.getBotCallbackAnswer">messages.getBotCallbackAnswer</a>, an <a href="/constructor/updateBotCallbackQuery">updateBotCallbackQuery</a> or <a href="/constructor/updateInlineBotCallbackQuery">updateInlineBotCallbackQuery</a></li>
<li><code>message</code>, <code>alert</code>, <code>url</code> can contain messages and URLs to trigger different client behaviour, as <a href="#sending-a-callback-query">specified above »</a></li>
<li><code>cache_time</code> indicates the maximum amount of time in seconds that the result of the callback query may be cached by the <strong>client</strong>. </li>
</ul>
<p>If a <code>game_short_name</code> is present in the update, the bot should return the URL of the game with the specified name.<br>
The <a href="/method/messages.setBotCallbackAnswer">messages.setBotCallbackAnswer</a> method must be called anyway, even if no <code>message</code> or <code>url</code> is returned, to avoid timeouts on the client. </p></div>
</div>
</div>
</div>
<div class="footer_wrap">
<div class="footer_columns_wrap footer_desktop">
<div class="footer_column footer_column_telegram">
<h5>Telegram</h5>
<div class="footer_telegram_description"></div>
Telegram is a cloud-based mobile and desktop messaging app with a focus on security and speed.
</div>
<div class="footer_column">
<h5><a href="//telegram.org/faq">About</a></h5>
<ul>
<li><a href="//telegram.org/faq">FAQ</a></li>
<li><a href="//telegram.org/blog">Blog</a></li>
<li><a href="//telegram.org/jobs">Jobs</a></li>
</ul>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps#mobile-apps">Mobile Apps</a></h5>
<ul>
<li><a href="//telegram.org/dl/ios">iPhone/iPad</a></li>
<li><a href="//telegram.org/dl/android">Android</a></li>
<li><a href="//telegram.org/dl/wp">Windows Phone</a></li>
</ul>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps#desktop-apps">Desktop Apps</a></h5>
<ul>
<li><a href="//desktop.telegram.org/">PC/Mac/Linux</a></li>
<li><a href="//macos.telegram.org/">macOS</a></li>
<li><a href="//telegram.org/dl/web">Web-browser</a></li>
</ul>
</div>
<div class="footer_column footer_column_platform">
<h5><a href="/">Platform</a></h5>
<ul>
<li><a href="/api">API</a></li>
<li><a href="//translations.telegram.org/">Translations</a></li>
<li><a href="//instantview.telegram.org/">Instant View</a></li>
</ul>
</div>
</div>
<div class="footer_columns_wrap footer_mobile">
<div class="footer_column">
<h5><a href="//telegram.org/faq">About</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/blog">Blog</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps">Apps</a></h5>
</div>
<div class="footer_column">
<h5><a href="/">Platform</a></h5>
</div>
<div class="footer_column">
<h5><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)">Twitter</a></h5>
</div>
</div>
</div>
</div>
<script src="/js/main.js?42"></script>
<script src="/js/jquery.min.js?1"></script>
<script src="/js/bootstrap.min.js"></script>
<script>window.initDevPageNav&&initDevPageNav();
backToTopInit("Go up");
removePreloadInit();
</script>
</body>
</html>
<!-- page generated in 18ms -->

View file

@ -0,0 +1,140 @@
<!DOCTYPE html>
<html class="">
<head>
<meta charset="utf-8">
<title>Commands</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="Bots offer a set of commands that can be used by users in private, or in a chat.">
<meta property="og:title" content="Commands">
<meta property="og:image" content="">
<meta property="og:description" content="Bots offer a set of commands that can be used by users in private, or in a chat.">
<link rel="shortcut icon" href="/favicon.ico?4" type="image/x-icon" />
<link href="/css/bootstrap.min.css?3" rel="stylesheet">
<link href="/css/telegram.css?212" rel="stylesheet" media="screen">
<style>
</style>
</head>
<body class="preload">
<div class="dev_page_wrap">
<div class="dev_page_head navbar navbar-static-top navbar-tg">
<div class="navbar-inner">
<div class="container clearfix">
<ul class="nav navbar-nav navbar-right hidden-xs"><li class="navbar-twitter"><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)"><i class="icon icon-twitter"></i><span> Twitter</span></a></li></ul>
<ul class="nav navbar-nav">
<li><a href="//telegram.org/">Home</a></li>
<li class="hidden-xs"><a href="//telegram.org/faq">FAQ</a></li>
<li class="hidden-xs"><a href="//telegram.org/apps">Apps</a></li>
<li class="active"><a href="/api">API</a></li>
<li class=""><a href="/mtproto">Protocol</a></li>
<li class=""><a href="/schema">Schema</a></li>
</ul>
</div>
</div>
</div>
<div class="container clearfix">
<div class="dev_page">
<div id="dev_page_content_wrap" class=" ">
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/api/bots%2Fcommands" >Commands</a></li></ul></div>
<h1 id="dev_page_title">Commands</h1>
<div id="dev_page_content"><!-- scroll_nav -->
<p><a href="/bots">Bots</a> offer a set of <a href="/bots/#commands">commands</a> that can be used by users in private, or in a chat. </p>
<p>For a simplified description using the HTTP bot API, see <a href="/bots/#commands">here »</a>. </p>
<h3><a class="anchor" href="#getting-commands" id="getting-commands" name="getting-commands"><i class="anchor-icon"></i></a>Getting commands</h3>
<pre><code><a href='/constructor/botCommand'>botCommand</a>#c27ac8c7 command:<a href='/type/string'>string</a> description:<a href='/type/string'>string</a> = <a href='/type/BotCommand'>BotCommand</a>;
<a href='/constructor/botInfo'>botInfo</a>#98e81d3a user_id:<a href='/type/int'>int</a> description:<a href='/type/string'>string</a> commands:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/BotCommand'>BotCommand</a>&gt; = <a href='/type/BotInfo'>BotInfo</a>;
<a href='/constructor/channelFull'>channelFull</a>#f0e6672a flags:<a href='/type/%23'>#</a> can_view_participants:flags.3?<a href='/constructor/true'>true</a> can_set_username:flags.6?<a href='/constructor/true'>true</a> can_set_stickers:flags.7?<a href='/constructor/true'>true</a> hidden_prehistory:flags.10?<a href='/constructor/true'>true</a> can_set_location:flags.16?<a href='/constructor/true'>true</a> has_scheduled:flags.19?<a href='/constructor/true'>true</a> can_view_stats:flags.20?<a href='/constructor/true'>true</a> blocked:flags.22?<a href='/constructor/true'>true</a> id:<a href='/type/int'>int</a> about:<a href='/type/string'>string</a> participants_count:flags.0?<a href='/type/int'>int</a> admins_count:flags.1?<a href='/type/int'>int</a> kicked_count:flags.2?<a href='/type/int'>int</a> banned_count:flags.2?<a href='/type/int'>int</a> online_count:flags.13?<a href='/type/int'>int</a> read_inbox_max_id:<a href='/type/int'>int</a> read_outbox_max_id:<a href='/type/int'>int</a> unread_count:<a href='/type/int'>int</a> chat_photo:<a href='/type/Photo'>Photo</a> notify_settings:<a href='/type/PeerNotifySettings'>PeerNotifySettings</a> exported_invite:<a href='/type/ExportedChatInvite'>ExportedChatInvite</a> bot_info:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/BotInfo'>BotInfo</a>&gt; migrated_from_chat_id:flags.4?<a href='/type/int'>int</a> migrated_from_max_id:flags.4?<a href='/type/int'>int</a> pinned_msg_id:flags.5?<a href='/type/int'>int</a> stickerset:flags.8?<a href='/type/StickerSet'>StickerSet</a> available_min_id:flags.9?<a href='/type/int'>int</a> folder_id:flags.11?<a href='/type/int'>int</a> linked_chat_id:flags.14?<a href='/type/int'>int</a> location:flags.15?<a href='/type/ChannelLocation'>ChannelLocation</a> slowmode_seconds:flags.17?<a href='/type/int'>int</a> slowmode_next_send_date:flags.18?<a href='/type/int'>int</a> stats_dc:flags.12?<a href='/type/int'>int</a> pts:<a href='/type/int'>int</a> = <a href='/type/ChatFull'>ChatFull</a>;
<a href='/constructor/userFull'>userFull</a>#edf17c12 flags:<a href='/type/%23'>#</a> blocked:flags.0?<a href='/constructor/true'>true</a> phone_calls_available:flags.4?<a href='/constructor/true'>true</a> phone_calls_private:flags.5?<a href='/constructor/true'>true</a> can_pin_message:flags.7?<a href='/constructor/true'>true</a> has_scheduled:flags.12?<a href='/constructor/true'>true</a> video_calls_available:flags.13?<a href='/constructor/true'>true</a> user:<a href='/type/User'>User</a> about:flags.1?<a href='/type/string'>string</a> settings:<a href='/type/PeerSettings'>PeerSettings</a> profile_photo:flags.2?<a href='/type/Photo'>Photo</a> notify_settings:<a href='/type/PeerNotifySettings'>PeerNotifySettings</a> bot_info:flags.3?<a href='/type/BotInfo'>BotInfo</a> pinned_msg_id:flags.6?<a href='/type/int'>int</a> common_chats_count:<a href='/type/int'>int</a> folder_id:flags.11?<a href='/type/int'>int</a> = <a href='/type/UserFull'>UserFull</a>;
<a href='/constructor/user'>user</a>#938458c1 flags:<a href='/type/%23'>#</a> self:flags.10?<a href='/constructor/true'>true</a> contact:flags.11?<a href='/constructor/true'>true</a> mutual_contact:flags.12?<a href='/constructor/true'>true</a> deleted:flags.13?<a href='/constructor/true'>true</a> bot:flags.14?<a href='/constructor/true'>true</a> bot_chat_history:flags.15?<a href='/constructor/true'>true</a> bot_nochats:flags.16?<a href='/constructor/true'>true</a> verified:flags.17?<a href='/constructor/true'>true</a> restricted:flags.18?<a href='/constructor/true'>true</a> min:flags.20?<a href='/constructor/true'>true</a> bot_inline_geo:flags.21?<a href='/constructor/true'>true</a> support:flags.23?<a href='/constructor/true'>true</a> scam:flags.24?<a href='/constructor/true'>true</a> apply_min_photo:flags.25?<a href='/constructor/true'>true</a> id:<a href='/type/int'>int</a> access_hash:flags.0?<a href='/type/long'>long</a> first_name:flags.1?<a href='/type/string'>string</a> last_name:flags.2?<a href='/type/string'>string</a> username:flags.3?<a href='/type/string'>string</a> phone:flags.4?<a href='/type/string'>string</a> photo:flags.5?<a href='/type/UserProfilePhoto'>UserProfilePhoto</a> status:flags.6?<a href='/type/UserStatus'>UserStatus</a> bot_info_version:flags.14?<a href='/type/int'>int</a> restriction_reason:flags.18?<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/RestrictionReason'>RestrictionReason</a>&gt; bot_inline_placeholder:flags.19?<a href='/type/string'>string</a> lang_code:flags.22?<a href='/type/string'>string</a> = <a href='/type/User'>User</a>;</code></pre>
<p>The <a href="/constructor/botInfo">botInfo</a> constructors contained in the <a href="/constructor/userFull">userFull</a>, <a href="/constructor/chatFull">chatFull</a>, <a href="/constructor/channelFull">channelFull</a> contain a list of commands, and for groups, the ID and a description of each bot. </p>
<p>In graphical clients, when users begin a message with a <code>/</code>, a list of commands supported by all bots present in the current chat should be shown; the same should be done for one-to-one chats with the bot itself. </p>
<p>If the command list of a bot changes, the <code>bot_info_version</code> contained in the <a href="/constructor/user">user</a> constructor received in updates will change; this indicates that the client should refetch full bot information using <a href="/method/users.getFullUser">users.getFullUser</a>.</p>
<h3><a class="anchor" href="#setting-commands" id="setting-commands" name="setting-commands"><i class="anchor-icon"></i></a>Setting commands</h3>
<pre><code><a href='/constructor/botCommand'>botCommand</a>#c27ac8c7 command:<a href='/type/string'>string</a> description:<a href='/type/string'>string</a> = <a href='/type/BotCommand'>BotCommand</a>;
---functions---
<a href='/method/bots.setBotCommands'>bots.setBotCommands</a>#805d46f6 commands:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/BotCommand'>BotCommand</a>&gt; = <a href='/type/Bool'>Bool</a>;</code></pre>
<p>The command list can be changed by the owner of the bot through <a href="https://t.me/botfather">@botfather</a>, but bots can also change their own command list by invoking <a href="/method/bots.setBotCommands">bots.setBotCommands</a>.</p></div>
</div>
</div>
</div>
<div class="footer_wrap">
<div class="footer_columns_wrap footer_desktop">
<div class="footer_column footer_column_telegram">
<h5>Telegram</h5>
<div class="footer_telegram_description"></div>
Telegram is a cloud-based mobile and desktop messaging app with a focus on security and speed.
</div>
<div class="footer_column">
<h5><a href="//telegram.org/faq">About</a></h5>
<ul>
<li><a href="//telegram.org/faq">FAQ</a></li>
<li><a href="//telegram.org/blog">Blog</a></li>
<li><a href="//telegram.org/jobs">Jobs</a></li>
</ul>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps#mobile-apps">Mobile Apps</a></h5>
<ul>
<li><a href="//telegram.org/dl/ios">iPhone/iPad</a></li>
<li><a href="//telegram.org/dl/android">Android</a></li>
<li><a href="//telegram.org/dl/wp">Windows Phone</a></li>
</ul>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps#desktop-apps">Desktop Apps</a></h5>
<ul>
<li><a href="//desktop.telegram.org/">PC/Mac/Linux</a></li>
<li><a href="//macos.telegram.org/">macOS</a></li>
<li><a href="//telegram.org/dl/web">Web-browser</a></li>
</ul>
</div>
<div class="footer_column footer_column_platform">
<h5><a href="/">Platform</a></h5>
<ul>
<li><a href="/api">API</a></li>
<li><a href="//translations.telegram.org/">Translations</a></li>
<li><a href="//instantview.telegram.org/">Instant View</a></li>
</ul>
</div>
</div>
<div class="footer_columns_wrap footer_mobile">
<div class="footer_column">
<h5><a href="//telegram.org/faq">About</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/blog">Blog</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps">Apps</a></h5>
</div>
<div class="footer_column">
<h5><a href="/">Platform</a></h5>
</div>
<div class="footer_column">
<h5><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)">Twitter</a></h5>
</div>
</div>
</div>
</div>
<script src="/js/main.js?42"></script>
<script src="/js/jquery.min.js?1"></script>
<script src="/js/bootstrap.min.js"></script>
<script>window.initDevPageNav&&initDevPageNav();
backToTopInit("Go up");
removePreloadInit();
</script>
</body>
</html>
<!-- page generated in 21.17ms -->

View file

@ -0,0 +1,171 @@
<!DOCTYPE html>
<html class="">
<head>
<meta charset="utf-8">
<title>Games</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="Bots can offer users HTML5 games to play solo or to compete against each other in groups and one-on-one chats. ">
<meta property="og:title" content="Games">
<meta property="og:image" content="">
<meta property="og:description" content="Bots can offer users HTML5 games to play solo or to compete against each other in groups and one-on-one chats. ">
<link rel="shortcut icon" href="/favicon.ico?4" type="image/x-icon" />
<link href="/css/bootstrap.min.css?3" rel="stylesheet">
<link href="/css/telegram.css?212" rel="stylesheet" media="screen">
<style>
</style>
</head>
<body class="preload">
<div class="dev_page_wrap">
<div class="dev_page_head navbar navbar-static-top navbar-tg">
<div class="navbar-inner">
<div class="container clearfix">
<ul class="nav navbar-nav navbar-right hidden-xs"><li class="navbar-twitter"><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)"><i class="icon icon-twitter"></i><span> Twitter</span></a></li></ul>
<ul class="nav navbar-nav">
<li><a href="//telegram.org/">Home</a></li>
<li class="hidden-xs"><a href="//telegram.org/faq">FAQ</a></li>
<li class="hidden-xs"><a href="//telegram.org/apps">Apps</a></li>
<li class="active"><a href="/api">API</a></li>
<li class=""><a href="/mtproto">Protocol</a></li>
<li class=""><a href="/schema">Schema</a></li>
</ul>
</div>
</div>
</div>
<div class="container clearfix">
<div class="dev_page">
<div id="dev_page_content_wrap" class=" ">
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/api/bots%2Fgames" >Games</a></li></ul></div>
<h1 id="dev_page_title">Games</h1>
<div id="dev_page_content"><!-- scroll_nav -->
<p>Bots can offer users <a href="/bots/games">HTML5 games</a> to play solo or to compete against each other in groups and one-on-one chats. </p>
<h3><a class="anchor" href="#sending-a-game" id="sending-a-game" name="sending-a-game"><i class="anchor-icon"></i></a>Sending a game</h3>
<pre><code><a href='/constructor/inputUserSelf'>inputUserSelf</a>#f7c1b13f = <a href='/type/InputUser'>InputUser</a>;
<a href='/constructor/inputGameID'>inputGameID</a>#32c3e77 id:<a href='/type/long'>long</a> access_hash:<a href='/type/long'>long</a> = <a href='/type/InputGame'>InputGame</a>;
<a href='/constructor/inputGameShortName'>inputGameShortName</a>#c331e80a bot_id:<a href='/type/InputUser'>InputUser</a> short_name:<a href='/type/string'>string</a> = <a href='/type/InputGame'>InputGame</a>;
<a href='/constructor/inputMediaGame'>inputMediaGame</a>#d33f43f3 id:<a href='/type/InputGame'>InputGame</a> = <a href='/type/InputMedia'>InputMedia</a>;
<a href='/constructor/game'>game</a>#bdf9653b flags:<a href='/type/%23'>#</a> id:<a href='/type/long'>long</a> access_hash:<a href='/type/long'>long</a> short_name:<a href='/type/string'>string</a> title:<a href='/type/string'>string</a> description:<a href='/type/string'>string</a> photo:<a href='/type/Photo'>Photo</a> document:flags.0?<a href='/type/Document'>Document</a> = <a href='/type/Game'>Game</a>;
<a href='/constructor/messageMediaGame'>messageMediaGame</a>#fdb19008 game:<a href='/type/Game'>Game</a> = <a href='/type/MessageMedia'>MessageMedia</a>;
---functions---
<a href='/method/messages.sendMedia'>messages.sendMedia</a>#3491eba9 flags:<a href='/type/%23'>#</a> silent:flags.5?<a href='/constructor/true'>true</a> background:flags.6?<a href='/constructor/true'>true</a> clear_draft:flags.7?<a href='/constructor/true'>true</a> peer:<a href='/type/InputPeer'>InputPeer</a> reply_to_msg_id:flags.0?<a href='/type/int'>int</a> media:<a href='/type/InputMedia'>InputMedia</a> message:<a href='/type/string'>string</a> random_id:<a href='/type/long'>long</a> reply_markup:flags.2?<a href='/type/ReplyMarkup'>ReplyMarkup</a> entities:flags.3?<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/MessageEntity'>MessageEntity</a>&gt; schedule_date:flags.10?<a href='/type/int'>int</a> = <a href='/type/Updates'>Updates</a>;</code></pre>
<p>Bots can directly send a game using <a href="/method/messages.sendMedia">messages.sendMedia</a>, providing:</p>
<ul>
<li>The bot's shortname obtained from <a href="https://t.me/botfather">@BotFather</a> to <code>inputGameShortName.short_name</code></li>
<li>The current bot's info to <code>inputGameShortName.bot_id</code></li>
</ul>
<p>The sent message will contain a <a href="/constructor/messageMediaGame">messageMediaGame</a> with a <a href="/constructor/game">game</a>, that can then be used by users to forward the game using sendMedia with <a href="/constructor/inputGameID">inputGameID</a>.</p>
<h3><a class="anchor" href="#starting-a-game" id="starting-a-game" name="starting-a-game"><i class="anchor-icon"></i></a>Starting a game</h3>
<p>Games are started clicking on the button, which triggers an callback query that returns the game URL, for more info <a href="/api/bots/buttons#callback-queries">see here &amp;raquo</a>.<br>
The game should then be opened in a WebView or in native UI (specified by the <code>native_ui</code> flag), exposing the <a href="/api/web-events">appropriate HTML5 APIs</a> in order to receive various JS game events directly from the code of the game, as described <a href="/api/web-events">here »</a>. </p>
<h3><a class="anchor" href="#setting-highscores" id="setting-highscores" name="setting-highscores"><i class="anchor-icon"></i></a>Setting highscores</h3>
<pre><code>---functions---
<a href='/method/messages.setGameScore'>messages.setGameScore</a>#8ef8ecc0 flags:<a href='/type/%23'>#</a> edit_message:flags.0?<a href='/constructor/true'>true</a> force:flags.1?<a href='/constructor/true'>true</a> peer:<a href='/type/InputPeer'>InputPeer</a> id:<a href='/type/int'>int</a> user_id:<a href='/type/InputUser'>InputUser</a> score:<a href='/type/int'>int</a> = <a href='/type/Updates'>Updates</a>;
<a href='/method/messages.setInlineGameScore'>messages.setInlineGameScore</a>#15ad9f64 flags:<a href='/type/%23'>#</a> edit_message:flags.0?<a href='/constructor/true'>true</a> force:flags.1?<a href='/constructor/true'>true</a> id:<a href='/type/InputBotInlineMessageID'>InputBotInlineMessageID</a> user_id:<a href='/type/InputUser'>InputUser</a> score:<a href='/type/int'>int</a> = <a href='/type/Bool'>Bool</a>;</code></pre>
<p>Games are supposed to report back to the MTProto API every time the user looses a game with a new highscore.<br>
Since games run in the browser, they cannot directly report data to the API using the bot token, which must be kept secret.<br>
Instead, they should send highscores to an intermediate server, that will then report scores using <a href="/method/messages.setGameScore">messages.setGameScore</a> or <a href="/method/messages.setInlineGameScore">messages.setInlineGameScore</a>, depending on the source of the game. </p>
<ul>
<li>The <code>edit_message</code> flag should be set if the game message should be automatically edited to include the current scoreboard</li>
<li>The <code>force</code> flag should be set if the high score is allowed to decrease. This can be useful when fixing mistakes or banning cheaters.</li>
</ul>
<h3><a class="anchor" href="#getting-highscores" id="getting-highscores" name="getting-highscores"><i class="anchor-icon"></i></a>Getting highscores</h3>
<pre><code><a href='/constructor/messageActionGameScore'>messageActionGameScore</a>#92a72876 game_id:<a href='/type/long'>long</a> score:<a href='/type/int'>int</a> = <a href='/type/MessageAction'>MessageAction</a>;
<a href='/constructor/messageService'>messageService</a>#286fa604 flags:<a href='/type/%23'>#</a> out:flags.1?<a href='/constructor/true'>true</a> mentioned:flags.4?<a href='/constructor/true'>true</a> media_unread:flags.5?<a href='/constructor/true'>true</a> silent:flags.13?<a href='/constructor/true'>true</a> post:flags.14?<a href='/constructor/true'>true</a> legacy:flags.19?<a href='/constructor/true'>true</a> id:<a href='/type/int'>int</a> from_id:flags.8?<a href='/type/Peer'>Peer</a> peer_id:<a href='/type/Peer'>Peer</a> reply_to:flags.3?<a href='/type/MessageReplyHeader'>MessageReplyHeader</a> date:<a href='/type/int'>int</a> action:<a href='/type/MessageAction'>MessageAction</a> = <a href='/type/Message'>Message</a>;
<a href='/constructor/highScore'>highScore</a>#58fffcd0 pos:<a href='/type/int'>int</a> user_id:<a href='/type/int'>int</a> score:<a href='/type/int'>int</a> = <a href='/type/HighScore'>HighScore</a>;
<a href='/constructor/messages.highScores'>messages.highScores</a>#9a3bfd99 scores:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/HighScore'>HighScore</a>&gt; users:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/User'>User</a>&gt; = <a href='/type/messages.HighScores'>messages.HighScores</a>;
---functions---
<a href='/method/messages.getGameHighScores'>messages.getGameHighScores</a>#e822649d peer:<a href='/type/InputPeer'>InputPeer</a> id:<a href='/type/int'>int</a> user_id:<a href='/type/InputUser'>InputUser</a> = <a href='/type/messages.HighScores'>messages.HighScores</a>;
<a href='/method/messages.getInlineGameHighScores'>messages.getInlineGameHighScores</a>#f635e1b id:<a href='/type/InputBotInlineMessageID'>InputBotInlineMessageID</a> user_id:<a href='/type/InputUser'>InputUser</a> = <a href='/type/messages.HighScores'>messages.HighScores</a>;</code></pre>
<p>Every time a highscore is reached, and the <code>edit_message</code> flag is set when reporting the score, a <a href="/constructor/messageService">messageService</a> with a <a href="/constructor/messageActionGameScore">messageActionGameScore</a> is generated, indicating that the highscore of a certain game has changed, thanks to a certain <code>user_id</code>.<br>
Our own current position of the scoreboard is also reported as <code>pos</code>. </p>
<p>When receiving such an update, graphical clients should refetch the scoreboard using <a href="/method/messages.getGameHighScores">messages.getGameHighScores</a> or <a href="/method/messages.getInlineGameHighScores">messages.getInlineGameHighScores</a>.</p></div>
</div>
</div>
</div>
<div class="footer_wrap">
<div class="footer_columns_wrap footer_desktop">
<div class="footer_column footer_column_telegram">
<h5>Telegram</h5>
<div class="footer_telegram_description"></div>
Telegram is a cloud-based mobile and desktop messaging app with a focus on security and speed.
</div>
<div class="footer_column">
<h5><a href="//telegram.org/faq">About</a></h5>
<ul>
<li><a href="//telegram.org/faq">FAQ</a></li>
<li><a href="//telegram.org/blog">Blog</a></li>
<li><a href="//telegram.org/jobs">Jobs</a></li>
</ul>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps#mobile-apps">Mobile Apps</a></h5>
<ul>
<li><a href="//telegram.org/dl/ios">iPhone/iPad</a></li>
<li><a href="//telegram.org/dl/android">Android</a></li>
<li><a href="//telegram.org/dl/wp">Windows Phone</a></li>
</ul>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps#desktop-apps">Desktop Apps</a></h5>
<ul>
<li><a href="//desktop.telegram.org/">PC/Mac/Linux</a></li>
<li><a href="//macos.telegram.org/">macOS</a></li>
<li><a href="//telegram.org/dl/web">Web-browser</a></li>
</ul>
</div>
<div class="footer_column footer_column_platform">
<h5><a href="/">Platform</a></h5>
<ul>
<li><a href="/api">API</a></li>
<li><a href="//translations.telegram.org/">Translations</a></li>
<li><a href="//instantview.telegram.org/">Instant View</a></li>
</ul>
</div>
</div>
<div class="footer_columns_wrap footer_mobile">
<div class="footer_column">
<h5><a href="//telegram.org/faq">About</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/blog">Blog</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps">Apps</a></h5>
</div>
<div class="footer_column">
<h5><a href="/">Platform</a></h5>
</div>
<div class="footer_column">
<h5><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)">Twitter</a></h5>
</div>
</div>
</div>
</div>
<script src="/js/main.js?42"></script>
<script src="/js/jquery.min.js?1"></script>
<script src="/js/bootstrap.min.js"></script>
<script>window.initDevPageNav&&initDevPageNav();
backToTopInit("Go up");
removePreloadInit();
</script>
</body>
</html>
<!-- page generated in 9.75ms -->

View file

@ -0,0 +1,215 @@
<!DOCTYPE html>
<html class="">
<head>
<meta charset="utf-8">
<title>Inline</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="Users can interact with your bot via inline queries, straight from the text input field in any chat.
This article describes…">
<meta property="og:title" content="Inline">
<meta property="og:image" content="">
<meta property="og:description" content="Users can interact with your bot via inline queries, straight from the text input field in any chat.
This article describes…">
<link rel="shortcut icon" href="/favicon.ico?4" type="image/x-icon" />
<link href="/css/bootstrap.min.css?3" rel="stylesheet">
<link href="/css/telegram.css?212" rel="stylesheet" media="screen">
<style>
</style>
</head>
<body class="preload">
<div class="dev_page_wrap">
<div class="dev_page_head navbar navbar-static-top navbar-tg">
<div class="navbar-inner">
<div class="container clearfix">
<ul class="nav navbar-nav navbar-right hidden-xs"><li class="navbar-twitter"><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)"><i class="icon icon-twitter"></i><span> Twitter</span></a></li></ul>
<ul class="nav navbar-nav">
<li><a href="//telegram.org/">Home</a></li>
<li class="hidden-xs"><a href="//telegram.org/faq">FAQ</a></li>
<li class="hidden-xs"><a href="//telegram.org/apps">Apps</a></li>
<li class="active"><a href="/api">API</a></li>
<li class=""><a href="/mtproto">Protocol</a></li>
<li class=""><a href="/schema">Schema</a></li>
</ul>
</div>
</div>
</div>
<div class="container clearfix">
<div class="dev_page">
<div id="dev_page_content_wrap" class=" ">
<div class="dev_page_bread_crumbs"></div>
<h1 id="dev_page_title">Inline</h1>
<div id="dev_page_content"><!-- scroll_nav -->
<p>Users can interact with your bot via <a href="/bots/#inline-mode"><strong>inline queries</strong></a>, straight from the <strong>text input field</strong> in <strong>any</strong> chat.<br>
This article describes the full inline bot flow, using the MTProto API. </p>
<p>For a simplified description using the HTTP bot API, see <a href="/bots/#inline-mode">here »</a>. </p>
<h3><a class="anchor" href="#making-an-inline-query" id="making-an-inline-query" name="making-an-inline-query"><i class="anchor-icon"></i></a>Making an inline query</h3>
<pre><code><a href='/constructor/messages.botResults'>messages.botResults</a>#947ca848 flags:<a href='/type/%23'>#</a> gallery:flags.0?<a href='/constructor/true'>true</a> query_id:<a href='/type/long'>long</a> next_offset:flags.1?<a href='/type/string'>string</a> switch_pm:flags.2?<a href='/type/InlineBotSwitchPM'>InlineBotSwitchPM</a> results:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/BotInlineResult'>BotInlineResult</a>&gt; cache_time:<a href='/type/int'>int</a> users:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/User'>User</a>&gt; = <a href='/type/messages.BotResults'>messages.BotResults</a>;
---functions---
<a href='/method/messages.getInlineBotResults'>messages.getInlineBotResults</a>#514e999d flags:<a href='/type/%23'>#</a> bot:<a href='/type/InputUser'>InputUser</a> peer:<a href='/type/InputPeer'>InputPeer</a> geo_point:flags.0?<a href='/type/InputGeoPoint'>InputGeoPoint</a> query:<a href='/type/string'>string</a> offset:<a href='/type/string'>string</a> = <a href='/type/messages.BotResults'>messages.BotResults</a>;</code></pre>
<p>When, in a graphical client, the user starts a message with an <code>@</code>, clients should:</p>
<ul>
<li>Use the cached <a href="/api/top-rating">top peer rating for inline bots</a> to show a list of frequently used inline bots.</li>
<li>If the user chooses a bot from the recent bot list or:</li>
<li>Finishes typing a full username followed by a whitespace, and if the username <a href="/method/contacts.resolveUsername">resolves</a> to a valid bot</li>
<li><a href="/method/messages.getInlineBotResults">messages.getInlineBotResults</a> is called, with the following parameters:<ul>
<li><code>bot</code> - The bot peer</li>
<li><code>peer</code> - The chat where the user made the query</li>
<li><code>geo_point</code> - The user's current geolocation, if the bot requires <a href="/bots/inline#location-based-results">location-based inline results</a> (the <code>bot_inline_geo</code> flag of the bot's <a href="/constructor/user">user constructor</a> will be set)</li>
<li><code>query</code> - What the user typed after the bot's username</li>
<li><code>offset</code> - If the user scrolls past the first <code>len(results)</code> results, and <code>next_offset</code> field is set, the inline query should be repeated with this offset.</li>
</ul>
</li>
</ul>
<h3><a class="anchor" href="#answering-to-an-inline-query" id="answering-to-an-inline-query" name="answering-to-an-inline-query"><i class="anchor-icon"></i></a>Answering to an inline query</h3>
<pre><code><a href='/constructor/inputBotInlineMessageMediaAuto'>inputBotInlineMessageMediaAuto</a>#3380c786 flags:<a href='/type/%23'>#</a> message:<a href='/type/string'>string</a> entities:flags.1?<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/MessageEntity'>MessageEntity</a>&gt; reply_markup:flags.2?<a href='/type/ReplyMarkup'>ReplyMarkup</a> = <a href='/type/InputBotInlineMessage'>InputBotInlineMessage</a>;
<a href='/constructor/inputBotInlineMessageText'>inputBotInlineMessageText</a>#3dcd7a87 flags:<a href='/type/%23'>#</a> no_webpage:flags.0?<a href='/constructor/true'>true</a> message:<a href='/type/string'>string</a> entities:flags.1?<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/MessageEntity'>MessageEntity</a>&gt; reply_markup:flags.2?<a href='/type/ReplyMarkup'>ReplyMarkup</a> = <a href='/type/InputBotInlineMessage'>InputBotInlineMessage</a>;
<a href='/constructor/inputBotInlineMessageMediaGeo'>inputBotInlineMessageMediaGeo</a>#96929a85 flags:<a href='/type/%23'>#</a> geo_point:<a href='/type/InputGeoPoint'>InputGeoPoint</a> heading:flags.0?<a href='/type/int'>int</a> period:flags.1?<a href='/type/int'>int</a> proximity_notification_radius:flags.3?<a href='/type/int'>int</a> reply_markup:flags.2?<a href='/type/ReplyMarkup'>ReplyMarkup</a> = <a href='/type/InputBotInlineMessage'>InputBotInlineMessage</a>;
<a href='/constructor/inputBotInlineMessageMediaVenue'>inputBotInlineMessageMediaVenue</a>#417bbf11 flags:<a href='/type/%23'>#</a> geo_point:<a href='/type/InputGeoPoint'>InputGeoPoint</a> title:<a href='/type/string'>string</a> address:<a href='/type/string'>string</a> provider:<a href='/type/string'>string</a> venue_id:<a href='/type/string'>string</a> venue_type:<a href='/type/string'>string</a> reply_markup:flags.2?<a href='/type/ReplyMarkup'>ReplyMarkup</a> = <a href='/type/InputBotInlineMessage'>InputBotInlineMessage</a>;
<a href='/constructor/inputBotInlineMessageMediaContact'>inputBotInlineMessageMediaContact</a>#a6edbffd flags:<a href='/type/%23'>#</a> phone_number:<a href='/type/string'>string</a> first_name:<a href='/type/string'>string</a> last_name:<a href='/type/string'>string</a> vcard:<a href='/type/string'>string</a> reply_markup:flags.2?<a href='/type/ReplyMarkup'>ReplyMarkup</a> = <a href='/type/InputBotInlineMessage'>InputBotInlineMessage</a>;
<a href='/constructor/inputBotInlineMessageGame'>inputBotInlineMessageGame</a>#4b425864 flags:<a href='/type/%23'>#</a> reply_markup:flags.2?<a href='/type/ReplyMarkup'>ReplyMarkup</a> = <a href='/type/InputBotInlineMessage'>InputBotInlineMessage</a>;
<a href='/constructor/inputBotInlineResult'>inputBotInlineResult</a>#88bf9319 flags:<a href='/type/%23'>#</a> id:<a href='/type/string'>string</a> type:<a href='/type/string'>string</a> title:flags.1?<a href='/type/string'>string</a> description:flags.2?<a href='/type/string'>string</a> url:flags.3?<a href='/type/string'>string</a> thumb:flags.4?<a href='/type/InputWebDocument'>InputWebDocument</a> content:flags.5?<a href='/type/InputWebDocument'>InputWebDocument</a> send_message:<a href='/type/InputBotInlineMessage'>InputBotInlineMessage</a> = <a href='/type/InputBotInlineResult'>InputBotInlineResult</a>;
<a href='/constructor/inputBotInlineResultPhoto'>inputBotInlineResultPhoto</a>#a8d864a7 id:<a href='/type/string'>string</a> type:<a href='/type/string'>string</a> photo:<a href='/type/InputPhoto'>InputPhoto</a> send_message:<a href='/type/InputBotInlineMessage'>InputBotInlineMessage</a> = <a href='/type/InputBotInlineResult'>InputBotInlineResult</a>;
<a href='/constructor/inputBotInlineResultDocument'>inputBotInlineResultDocument</a>#fff8fdc4 flags:<a href='/type/%23'>#</a> id:<a href='/type/string'>string</a> type:<a href='/type/string'>string</a> title:flags.1?<a href='/type/string'>string</a> description:flags.2?<a href='/type/string'>string</a> document:<a href='/type/InputDocument'>InputDocument</a> send_message:<a href='/type/InputBotInlineMessage'>InputBotInlineMessage</a> = <a href='/type/InputBotInlineResult'>InputBotInlineResult</a>;
<a href='/constructor/inputBotInlineResultGame'>inputBotInlineResultGame</a>#4fa417f2 id:<a href='/type/string'>string</a> short_name:<a href='/type/string'>string</a> send_message:<a href='/type/InputBotInlineMessage'>InputBotInlineMessage</a> = <a href='/type/InputBotInlineResult'>InputBotInlineResult</a>;
<a href='/constructor/updateBotInlineQuery'>updateBotInlineQuery</a>#54826690 flags:<a href='/type/%23'>#</a> query_id:<a href='/type/long'>long</a> user_id:<a href='/type/int'>int</a> query:<a href='/type/string'>string</a> geo:flags.0?<a href='/type/GeoPoint'>GeoPoint</a> offset:<a href='/type/string'>string</a> = <a href='/type/Update'>Update</a>;
---functions---
<a href='/method/messages.setInlineBotResults'>messages.setInlineBotResults</a>#eb5ea206 flags:<a href='/type/%23'>#</a> gallery:flags.0?<a href='/constructor/true'>true</a> private:flags.1?<a href='/constructor/true'>true</a> query_id:<a href='/type/long'>long</a> results:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/InputBotInlineResult'>InputBotInlineResult</a>&gt; cache_time:<a href='/type/int'>int</a> next_offset:flags.2?<a href='/type/string'>string</a> switch_pm:flags.3?<a href='/type/InlineBotSwitchPM'>InlineBotSwitchPM</a> = <a href='/type/Bool'>Bool</a>;</code></pre>
<p>Bots can answer to incoming <a href="/constructor/updateBotInlineQuery">updateBotInlineQuery</a> updates using <a href="/method/messages.setInlineBotResults">messages.setInlineBotResults</a>.<br>
Just like its <a href="/bots/api#answerinlinequery">bot API counterpart</a>, the method can be used to send a set of inline results to the user; see the <a href="/method/messages.setInlineBotResults">constructor page for more info on the MTProto method parameters »</a>.</p>
<p>In general, the method accepts a vector of <a href="/type/InputBotInlineResult">InputBotInlineResult</a> constructors, that when <a href="#sending-the-inline-query-result">chosen</a>, generates a message with optionally attached media, and even inline buttons.</p>
<h3><a class="anchor" href="#sending-the-inline-query-result" id="sending-the-inline-query-result" name="sending-the-inline-query-result"><i class="anchor-icon"></i></a>Sending the inline query result</h3>
<pre><code><a href='/constructor/botInlineMessageMediaAuto'>botInlineMessageMediaAuto</a>#764cf810 flags:<a href='/type/%23'>#</a> message:<a href='/type/string'>string</a> entities:flags.1?<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/MessageEntity'>MessageEntity</a>&gt; reply_markup:flags.2?<a href='/type/ReplyMarkup'>ReplyMarkup</a> = <a href='/type/BotInlineMessage'>BotInlineMessage</a>;
<a href='/constructor/botInlineMessageText'>botInlineMessageText</a>#8c7f65e2 flags:<a href='/type/%23'>#</a> no_webpage:flags.0?<a href='/constructor/true'>true</a> message:<a href='/type/string'>string</a> entities:flags.1?<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/MessageEntity'>MessageEntity</a>&gt; reply_markup:flags.2?<a href='/type/ReplyMarkup'>ReplyMarkup</a> = <a href='/type/BotInlineMessage'>BotInlineMessage</a>;
<a href='/constructor/botInlineMessageMediaGeo'>botInlineMessageMediaGeo</a>#51846fd flags:<a href='/type/%23'>#</a> geo:<a href='/type/GeoPoint'>GeoPoint</a> heading:flags.0?<a href='/type/int'>int</a> period:flags.1?<a href='/type/int'>int</a> proximity_notification_radius:flags.3?<a href='/type/int'>int</a> reply_markup:flags.2?<a href='/type/ReplyMarkup'>ReplyMarkup</a> = <a href='/type/BotInlineMessage'>BotInlineMessage</a>;
<a href='/constructor/botInlineMessageMediaVenue'>botInlineMessageMediaVenue</a>#8a86659c flags:<a href='/type/%23'>#</a> geo:<a href='/type/GeoPoint'>GeoPoint</a> title:<a href='/type/string'>string</a> address:<a href='/type/string'>string</a> provider:<a href='/type/string'>string</a> venue_id:<a href='/type/string'>string</a> venue_type:<a href='/type/string'>string</a> reply_markup:flags.2?<a href='/type/ReplyMarkup'>ReplyMarkup</a> = <a href='/type/BotInlineMessage'>BotInlineMessage</a>;
<a href='/constructor/botInlineMessageMediaContact'>botInlineMessageMediaContact</a>#18d1cdc2 flags:<a href='/type/%23'>#</a> phone_number:<a href='/type/string'>string</a> first_name:<a href='/type/string'>string</a> last_name:<a href='/type/string'>string</a> vcard:<a href='/type/string'>string</a> reply_markup:flags.2?<a href='/type/ReplyMarkup'>ReplyMarkup</a> = <a href='/type/BotInlineMessage'>BotInlineMessage</a>;
<a href='/constructor/botInlineResult'>botInlineResult</a>#11965f3a flags:<a href='/type/%23'>#</a> id:<a href='/type/string'>string</a> type:<a href='/type/string'>string</a> title:flags.1?<a href='/type/string'>string</a> description:flags.2?<a href='/type/string'>string</a> url:flags.3?<a href='/type/string'>string</a> thumb:flags.4?<a href='/type/WebDocument'>WebDocument</a> content:flags.5?<a href='/type/WebDocument'>WebDocument</a> send_message:<a href='/type/BotInlineMessage'>BotInlineMessage</a> = <a href='/type/BotInlineResult'>BotInlineResult</a>;
<a href='/constructor/botInlineMediaResult'>botInlineMediaResult</a>#17db940b flags:<a href='/type/%23'>#</a> id:<a href='/type/string'>string</a> type:<a href='/type/string'>string</a> photo:flags.0?<a href='/type/Photo'>Photo</a> document:flags.1?<a href='/type/Document'>Document</a> title:flags.2?<a href='/type/string'>string</a> description:flags.3?<a href='/type/string'>string</a> send_message:<a href='/type/BotInlineMessage'>BotInlineMessage</a> = <a href='/type/BotInlineResult'>BotInlineResult</a>;
<a href='/constructor/messages.botResults'>messages.botResults</a>#947ca848 flags:<a href='/type/%23'>#</a> gallery:flags.0?<a href='/constructor/true'>true</a> query_id:<a href='/type/long'>long</a> next_offset:flags.1?<a href='/type/string'>string</a> switch_pm:flags.2?<a href='/type/InlineBotSwitchPM'>InlineBotSwitchPM</a> results:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/BotInlineResult'>BotInlineResult</a>&gt; cache_time:<a href='/type/int'>int</a> users:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/User'>User</a>&gt; = <a href='/type/messages.BotResults'>messages.BotResults</a>;
---functions---
<a href='/method/messages.sendInlineBotResult'>messages.sendInlineBotResult</a>#220815b0 flags:<a href='/type/%23'>#</a> silent:flags.5?<a href='/constructor/true'>true</a> background:flags.6?<a href='/constructor/true'>true</a> clear_draft:flags.7?<a href='/constructor/true'>true</a> hide_via:flags.11?<a href='/constructor/true'>true</a> peer:<a href='/type/InputPeer'>InputPeer</a> reply_to_msg_id:flags.0?<a href='/type/int'>int</a> random_id:<a href='/type/long'>long</a> query_id:<a href='/type/long'>long</a> id:<a href='/type/string'>string</a> schedule_date:flags.10?<a href='/type/int'>int</a> = <a href='/type/Updates'>Updates</a>;</code></pre>
<p>The user client should display the <code>results</code> obtained <a href="#making-an-inline-query">during querying</a> in a list, making sure to handle eventual bot timeouts in the form of a <code>BOT_RESPONSE_TIMEOUT</code> RPC error, by simply not displaying anything.</p>
<p>If the user then chooses a specific <code>BotInlineResult</code>, the <a href="/method/messages.sendInlineBotResult">messages.sendInlineBotResult</a> method should be invoked, passing:</p>
<ul>
<li>The <code>query_id</code> from <code>messages.botResults</code></li>
<li>The <code>id</code> of the chosen result</li>
<li>The <code>peer</code> where to send the chosen result</li>
</ul>
<p>The resulting <a href="/constructor/message">message</a> will have the <code>via_bot_id</code> field set, to indicate that the result was generated by the bot that generated the inline result.<br>
Graphical clients should display the bot <code>@username</code> in the header of the message, allowing the user to click on it, automatically starting an inline query by inserting <code>@username</code> in the text bar.</p>
<h3><a class="anchor" href="#inline-feedback" id="inline-feedback" name="inline-feedback"><i class="anchor-icon"></i></a>Inline feedback</h3>
<pre><code><a href='/constructor/inputBotInlineMessageID'>inputBotInlineMessageID</a>#890c3d89 dc_id:<a href='/type/int'>int</a> id:<a href='/type/long'>long</a> access_hash:<a href='/type/long'>long</a> = <a href='/type/InputBotInlineMessageID'>InputBotInlineMessageID</a>;
<a href='/constructor/updateBotInlineSend'>updateBotInlineSend</a>#e48f964 flags:<a href='/type/%23'>#</a> user_id:<a href='/type/int'>int</a> query:<a href='/type/string'>string</a> geo:flags.0?<a href='/type/GeoPoint'>GeoPoint</a> id:<a href='/type/string'>string</a> msg_id:flags.1?<a href='/type/InputBotInlineMessageID'>InputBotInlineMessageID</a> = <a href='/type/Update'>Update</a>;</code></pre>
<p>If <a href="/bots/inline#collecting-feedback">feedback collection</a> is enabled, the bot may receive an <a href="/constructor/updateBotInlineSend">updateBotInlineSend</a> when the user <a href="#sending-the-inline-query-result">chooses and sends</a> an inline result. </p>
<p>Even if the <a href="/bots/inline#collecting-feedback">probability setting is set to 100%</a>, not all inline results may be reported due to caching (see the <code>cache_time</code> parameter in <a href="/api/bots/buttons#answering-a-callback-query">Answering a callback query</a>).<br>
<a href="/bots/inline#collecting-feedback">Feedback collection</a> can also create load issues for popular bots, so adjust the probability setting to a lower value in such cases.</p>
<p>Either way, feedback collection should only be used for statistical purposes rather than functional. </p>
<p>The <a href="/constructor/updateBotInlineSend">updateBotInlineSend</a> will contain: </p>
<ul>
<li><code>id</code> - The ID of the chosen result</li>
<li><code>msg_id</code> - The ID of the sent inline message</li>
<li><code>user_id</code> - The ID of the user that chose the result</li>
<li><code>query</code> - The query string that was used to obtain the result</li>
<li><code>geo</code> - For bots requiring <a href="/bots/inline#location-based-results">location-based inline results</a>, the user's location</li>
</ul>
<h3><a class="anchor" href="#editing-sent-inline-messages" id="editing-sent-inline-messages" name="editing-sent-inline-messages"><i class="anchor-icon"></i></a>Editing sent inline messages</h3>
<pre><code><a href='/constructor/updateInlineBotCallbackQuery'>updateInlineBotCallbackQuery</a>#f9d27a5a flags:<a href='/type/%23'>#</a> query_id:<a href='/type/long'>long</a> user_id:<a href='/type/int'>int</a> msg_id:<a href='/type/InputBotInlineMessageID'>InputBotInlineMessageID</a> chat_instance:<a href='/type/long'>long</a> data:flags.0?<a href='/type/bytes'>bytes</a> game_short_name:flags.1?<a href='/type/string'>string</a> = <a href='/type/Update'>Update</a>;
<a href='/constructor/inputBotInlineMessageID'>inputBotInlineMessageID</a>#890c3d89 dc_id:<a href='/type/int'>int</a> id:<a href='/type/long'>long</a> access_hash:<a href='/type/long'>long</a> = <a href='/type/InputBotInlineMessageID'>InputBotInlineMessageID</a>;
---functions---
<a href='/method/messages.editInlineBotMessage'>messages.editInlineBotMessage</a>#83557dba flags:<a href='/type/%23'>#</a> no_webpage:flags.1?<a href='/constructor/true'>true</a> id:<a href='/type/InputBotInlineMessageID'>InputBotInlineMessageID</a> message:flags.11?<a href='/type/string'>string</a> media:flags.14?<a href='/type/InputMedia'>InputMedia</a> reply_markup:flags.2?<a href='/type/ReplyMarkup'>ReplyMarkup</a> entities:flags.3?<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/MessageEntity'>MessageEntity</a>&gt; = <a href='/type/Bool'>Bool</a>;</code></pre>
<p>Sent inline messages can be edited by the bot, for example in response to a <a href="/api/bots/buttons#callback-queries">button press callback query</a>. </p>
<p>Simply pass the <a href="/constructor/inputBotInlineMessageID">inputBotInlineMessageID</a> specified in the <a href="/constructor/updateInlineBotCallbackQuery">updateInlineBotCallbackQuery</a> to <a href="/method/messages.editInlineBotMessage">messages.editInlineBotMessage</a> along with the new message, making sure to send the query to the <a href="/api/datacenter">datacenter</a> specified in <code>inputBotInlineMessageID.dc_id</code>.</p></div>
</div>
</div>
</div>
<div class="footer_wrap">
<div class="footer_columns_wrap footer_desktop">
<div class="footer_column footer_column_telegram">
<h5>Telegram</h5>
<div class="footer_telegram_description"></div>
Telegram is a cloud-based mobile and desktop messaging app with a focus on security and speed.
</div>
<div class="footer_column">
<h5><a href="//telegram.org/faq">About</a></h5>
<ul>
<li><a href="//telegram.org/faq">FAQ</a></li>
<li><a href="//telegram.org/blog">Blog</a></li>
<li><a href="//telegram.org/jobs">Jobs</a></li>
</ul>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps#mobile-apps">Mobile Apps</a></h5>
<ul>
<li><a href="//telegram.org/dl/ios">iPhone/iPad</a></li>
<li><a href="//telegram.org/dl/android">Android</a></li>
<li><a href="//telegram.org/dl/wp">Windows Phone</a></li>
</ul>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps#desktop-apps">Desktop Apps</a></h5>
<ul>
<li><a href="//desktop.telegram.org/">PC/Mac/Linux</a></li>
<li><a href="//macos.telegram.org/">macOS</a></li>
<li><a href="//telegram.org/dl/web">Web-browser</a></li>
</ul>
</div>
<div class="footer_column footer_column_platform">
<h5><a href="/">Platform</a></h5>
<ul>
<li><a href="/api">API</a></li>
<li><a href="//translations.telegram.org/">Translations</a></li>
<li><a href="//instantview.telegram.org/">Instant View</a></li>
</ul>
</div>
</div>
<div class="footer_columns_wrap footer_mobile">
<div class="footer_column">
<h5><a href="//telegram.org/faq">About</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/blog">Blog</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps">Apps</a></h5>
</div>
<div class="footer_column">
<h5><a href="/">Platform</a></h5>
</div>
<div class="footer_column">
<h5><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)">Twitter</a></h5>
</div>
</div>
</div>
</div>
<script src="/js/main.js?42"></script>
<script src="/js/jquery.min.js?1"></script>
<script src="/js/bootstrap.min.js"></script>
<script>window.initDevPageNav&&initDevPageNav();
backToTopInit("Go up");
removePreloadInit();
</script>
</body>
</html>
<!-- page generated in 12.07ms -->

View file

@ -0,0 +1,150 @@
<!DOCTYPE html>
<html class="">
<head>
<meta charset="utf-8">
<title>Channels</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="How to handle channels, supergroups, groups, and what&#39;s the difference between them.">
<meta property="og:title" content="Channels">
<meta property="og:image" content="2831d0518f782d1977">
<meta property="og:description" content="How to handle channels, supergroups, groups, and what&#39;s the difference between them.">
<link rel="shortcut icon" href="/favicon.ico?4" type="image/x-icon" />
<link href="/css/bootstrap.min.css?3" rel="stylesheet">
<link href="/css/telegram.css?212" rel="stylesheet" media="screen">
<style>
</style>
</head>
<body class="preload">
<div class="dev_page_wrap">
<div class="dev_page_head navbar navbar-static-top navbar-tg">
<div class="navbar-inner">
<div class="container clearfix">
<ul class="nav navbar-nav navbar-right hidden-xs"><li class="navbar-twitter"><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)"><i class="icon icon-twitter"></i><span> Twitter</span></a></li></ul>
<ul class="nav navbar-nav">
<li><a href="//telegram.org/">Home</a></li>
<li class="hidden-xs"><a href="//telegram.org/faq">FAQ</a></li>
<li class="hidden-xs"><a href="//telegram.org/apps">Apps</a></li>
<li class="active"><a href="/api">API</a></li>
<li class=""><a href="/mtproto">Protocol</a></li>
<li class=""><a href="/schema">Schema</a></li>
</ul>
</div>
</div>
</div>
<div class="container clearfix">
<div class="dev_page">
<div id="dev_page_content_wrap" class=" ">
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/api/channel" >Channels</a></li></ul></div>
<h1 id="dev_page_title">Channels</h1>
<div id="dev_page_content"><!-- scroll_nav -->
<h3><a class="anchor" href="#channels-chats--supergroups" id="channels-chats--supergroups" name="channels-chats--supergroups"><i class="anchor-icon"></i></a>Channels, chats &amp; supergroups</h3>
<p><a href="https://telegram.org/tour/channels">Channels</a> are a tool for broadcasting your messages to large audiences. They can have an unlimited number of subscribers, they can be public with a permanent URL and each post in a channel has its own view counter.
Technically, they are represented by <a href="/constructor/channel">channel</a> constructors.</p>
<p><a href="https://telegram.org/tour/groups">Supergroups</a> are a powerful tool for building communities and can support up to 200,000 members each.
Technically, supergroups are actually channels: they are represented by <a href="/constructor/channel">channel</a> constructors, with the <code>megagroup</code> flag set to true.</p>
<p>Channels and supergroup can be created using the <a href="/method/channels.createChannel">channels.createChannel</a> method, by setting the appropriate <code>broadcast</code> or <code>megagroup</code> flags.
Supergroups can also be assigned a <code>geo_point</code> to become <a href="https://telegram.org/blog/contacts-local-groups">geochats</a>.</p>
<p>In previous versions of telegram, only normal groups (represented by <a href="/constructor/chat">chat</a> constructors) could be created using <a href="/method/messages.createChat">messages.createChat</a>: these groups have fewer features, and can only have 200 members at max.</p>
<h3><a class="anchor" href="#migration" id="migration" name="migration"><i class="anchor-icon"></i></a>Migration</h3>
<p>To upgrade a legacy group to a supergroup, <a href="/method/messages.migrateChat">messages.migrateChat</a> can be used.
The <code>chats</code> field of the result will have two objects: </p>
<ul>
<li>A <a href="/constructor/chat">chat</a> constructor with a <code>migrated_to</code> field, indicating the address of the new supergroup</li>
<li>The new <a href="/constructor/channel">channel</a> megagroup constructor</li>
</ul>
<p>When <a href="/method/channels.getFullChannel">getting full info</a> about the migrated channel, the <a href="/constructor/channelFull">channelFull</a> object will have <code>migrated_from_chat_id</code> and <code>migrated_from_max_id</code> fields indicating the original ID of the chat, and the message ID in the original chat at which the group was migrated.</p>
<p>All users of the chat will receive an <a href="/constructor/updateNewMessage">updateNewMessage</a> from the old chat with a <a href="/constructor/messageService">messageService</a> containing a <a href="/constructor/messageActionChatMigrateTo">messageActionChatMigrateTo</a> constructor.</p>
<p>All new messages have to be sent to the new supergroup.</p>
<p>When working with migrated groups clients need to handle loading of the message history (as well as search results et cetera) from both the legacy group and the new supergroup. This is done by merging the two messages lists (requested with different <a href="/type/Peer">Peer</a> values) client side.</p>
<h3><a class="anchor" href="#rights" id="rights" name="rights"><i class="anchor-icon"></i></a>Rights</h3>
<p>Channels, legacy groups and supergroups allow setting <a href="https://telegram.org/blog/permissions-groups-undo">granular permissions</a> both for admins and specific users; channels, supergroups and legacy groups also allow setting global granular permissions for users.</p>
<p>For more info on how to set and modify rights, see <a href="/api/rights">here »</a>.</p>
<h3><a class="anchor" href="#pinned-messages" id="pinned-messages" name="pinned-messages"><i class="anchor-icon"></i></a>Pinned messages</h3>
<p>Telegram allows pinning multiple messages on top in a chat, group, supergroup or channel. </p>
<p>See <a href="/api/pin">here »</a> for more info on pinning and unpinning messages. </p>
<h3><a class="anchor" href="#discussion" id="discussion" name="discussion"><i class="anchor-icon"></i></a>Discussion</h3>
<p>Groups can be associated to a channel as a <a href="https://telegram.org/blog/privacy-discussions-web-bots">discussion group</a>, to allow users to discuss about posts. </p>
<p>For more info on how to set a discussion group in channel, see <a href="/api/discussion">here »</a></p>
<h3><a class="anchor" href="#recent-actions" id="recent-actions" name="recent-actions"><i class="anchor-icon"></i></a>Recent actions</h3>
<p>Both supergroups and channels offer a so-called <a href="https://telegram.org/blog/admin-revolution">admin log</a>, a log of recent relevant supergroup and channel actions, like the modification of group/channel settings or information on behalf of an admin, user kicks and bans, and more.</p>
<p>See <a href="/api/recent-actions">here »</a> for more info.</p></div>
</div>
</div>
</div>
<div class="footer_wrap">
<div class="footer_columns_wrap footer_desktop">
<div class="footer_column footer_column_telegram">
<h5>Telegram</h5>
<div class="footer_telegram_description"></div>
Telegram is a cloud-based mobile and desktop messaging app with a focus on security and speed.
</div>
<div class="footer_column">
<h5><a href="//telegram.org/faq">About</a></h5>
<ul>
<li><a href="//telegram.org/faq">FAQ</a></li>
<li><a href="//telegram.org/blog">Blog</a></li>
<li><a href="//telegram.org/jobs">Jobs</a></li>
</ul>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps#mobile-apps">Mobile Apps</a></h5>
<ul>
<li><a href="//telegram.org/dl/ios">iPhone/iPad</a></li>
<li><a href="//telegram.org/dl/android">Android</a></li>
<li><a href="//telegram.org/dl/wp">Windows Phone</a></li>
</ul>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps#desktop-apps">Desktop Apps</a></h5>
<ul>
<li><a href="//desktop.telegram.org/">PC/Mac/Linux</a></li>
<li><a href="//macos.telegram.org/">macOS</a></li>
<li><a href="//telegram.org/dl/web">Web-browser</a></li>
</ul>
</div>
<div class="footer_column footer_column_platform">
<h5><a href="/">Platform</a></h5>
<ul>
<li><a href="/api">API</a></li>
<li><a href="//translations.telegram.org/">Translations</a></li>
<li><a href="//instantview.telegram.org/">Instant View</a></li>
</ul>
</div>
</div>
<div class="footer_columns_wrap footer_mobile">
<div class="footer_column">
<h5><a href="//telegram.org/faq">About</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/blog">Blog</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps">Apps</a></h5>
</div>
<div class="footer_column">
<h5><a href="/">Platform</a></h5>
</div>
<div class="footer_column">
<h5><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)">Twitter</a></h5>
</div>
</div>
</div>
</div>
<script src="/js/main.js?42"></script>
<script src="/js/jquery.min.js?1"></script>
<script src="/js/bootstrap.min.js"></script>
<script>window.initDevPageNav&&initDevPageNav();
backToTopInit("Go up");
removePreloadInit();
</script>
</body>
</html>
<!-- page generated in 8.63ms -->

View file

@ -0,0 +1,320 @@
<!DOCTYPE html>
<html class="">
<head>
<meta charset="utf-8">
<title>Client configuration</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="The MTProto API has multiple configuration parameters that can be fetched with the appropriate methods.">
<meta property="og:title" content="Client configuration">
<meta property="og:image" content="">
<meta property="og:description" content="The MTProto API has multiple configuration parameters that can be fetched with the appropriate methods.">
<link rel="shortcut icon" href="/favicon.ico?4" type="image/x-icon" />
<link href="/css/bootstrap.min.css?3" rel="stylesheet">
<link href="/css/telegram.css?212" rel="stylesheet" media="screen">
<style>
</style>
</head>
<body class="preload">
<div class="dev_page_wrap">
<div class="dev_page_head navbar navbar-static-top navbar-tg">
<div class="navbar-inner">
<div class="container clearfix">
<ul class="nav navbar-nav navbar-right hidden-xs"><li class="navbar-twitter"><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)"><i class="icon icon-twitter"></i><span> Twitter</span></a></li></ul>
<ul class="nav navbar-nav">
<li><a href="//telegram.org/">Home</a></li>
<li class="hidden-xs"><a href="//telegram.org/faq">FAQ</a></li>
<li class="hidden-xs"><a href="//telegram.org/apps">Apps</a></li>
<li class="active"><a href="/api">API</a></li>
<li class=""><a href="/mtproto">Protocol</a></li>
<li class=""><a href="/schema">Schema</a></li>
</ul>
</div>
</div>
</div>
<div class="container clearfix">
<div class="dev_page">
<div id="dev_page_content_wrap" class=" ">
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/api/config" >Client configuration</a></li></ul></div>
<h1 id="dev_page_title">Client configuration</h1>
<div id="dev_page_content"><!-- scroll_nav -->
<p>The MTProto API has multiple configuration parameters that can be fetched with the appropriate methods. </p>
<h2><a class="anchor" href="#mtproto-configuration" id="mtproto-configuration" name="mtproto-configuration"><i class="anchor-icon"></i></a>MTProto configuration</h2>
<pre><code><a href='/constructor/config'>config</a>#330b4067 flags:<a href='/type/%23'>#</a> phonecalls_enabled:flags.1?<a href='/constructor/true'>true</a> default_p2p_contacts:flags.3?<a href='/constructor/true'>true</a> preload_featured_stickers:flags.4?<a href='/constructor/true'>true</a> ignore_phone_entities:flags.5?<a href='/constructor/true'>true</a> revoke_pm_inbox:flags.6?<a href='/constructor/true'>true</a> blocked_mode:flags.8?<a href='/constructor/true'>true</a> pfs_enabled:flags.13?<a href='/constructor/true'>true</a> date:<a href='/type/int'>int</a> expires:<a href='/type/int'>int</a> test_mode:<a href='/type/Bool'>Bool</a> this_dc:<a href='/type/int'>int</a> dc_options:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/DcOption'>DcOption</a>&gt; dc_txt_domain_name:<a href='/type/string'>string</a> chat_size_max:<a href='/type/int'>int</a> megagroup_size_max:<a href='/type/int'>int</a> forwarded_count_max:<a href='/type/int'>int</a> online_update_period_ms:<a href='/type/int'>int</a> offline_blur_timeout_ms:<a href='/type/int'>int</a> offline_idle_timeout_ms:<a href='/type/int'>int</a> online_cloud_timeout_ms:<a href='/type/int'>int</a> notify_cloud_delay_ms:<a href='/type/int'>int</a> notify_default_delay_ms:<a href='/type/int'>int</a> push_chat_period_ms:<a href='/type/int'>int</a> push_chat_limit:<a href='/type/int'>int</a> saved_gifs_limit:<a href='/type/int'>int</a> edit_time_limit:<a href='/type/int'>int</a> revoke_time_limit:<a href='/type/int'>int</a> revoke_pm_time_limit:<a href='/type/int'>int</a> rating_e_decay:<a href='/type/int'>int</a> stickers_recent_limit:<a href='/type/int'>int</a> stickers_faved_limit:<a href='/type/int'>int</a> channels_read_media_period:<a href='/type/int'>int</a> tmp_sessions:flags.0?<a href='/type/int'>int</a> pinned_dialogs_count_max:<a href='/type/int'>int</a> pinned_infolder_count_max:<a href='/type/int'>int</a> call_receive_timeout_ms:<a href='/type/int'>int</a> call_ring_timeout_ms:<a href='/type/int'>int</a> call_connect_timeout_ms:<a href='/type/int'>int</a> call_packet_timeout_ms:<a href='/type/int'>int</a> me_url_prefix:<a href='/type/string'>string</a> autoupdate_url_prefix:flags.7?<a href='/type/string'>string</a> gif_search_username:flags.9?<a href='/type/string'>string</a> venue_search_username:flags.10?<a href='/type/string'>string</a> img_search_username:flags.11?<a href='/type/string'>string</a> static_maps_provider:flags.12?<a href='/type/string'>string</a> caption_length_max:<a href='/type/int'>int</a> message_length_max:<a href='/type/int'>int</a> webfile_dc_id:<a href='/type/int'>int</a> suggested_lang_code:flags.2?<a href='/type/string'>string</a> lang_pack_version:flags.2?<a href='/type/int'>int</a> base_lang_pack_version:flags.2?<a href='/type/int'>int</a> = <a href='/type/Config'>Config</a>;
<a href='/constructor/nearestDc'>nearestDc</a>#8e1a1775 country:<a href='/type/string'>string</a> this_dc:<a href='/type/int'>int</a> nearest_dc:<a href='/type/int'>int</a> = <a href='/type/NearestDc'>NearestDc</a>;
---functions---
<a href='/method/help.getConfig'>help.getConfig</a>#c4f9186b = <a href='/type/Config'>Config</a>;
<a href='/method/help.getNearestDc'>help.getNearestDc</a>#1fb33026 = <a href='/type/NearestDc'>NearestDc</a>;</code></pre>
<p>The huge <a href="/constructor/config">config</a> constructor contains lots of useful information, from chat and message size limitations, to privacy settings, online status refresh interval and timeout, VoIP configuration, default inline bot usernames for GIF, image and venue lookup, and lots of other global and user-specific information, check out the <a href="/constructor/config">constructor page</a> for more information.</p>
<h2><a class="anchor" href="#client-configuration" id="client-configuration" name="client-configuration"><i class="anchor-icon"></i></a>Client configuration</h2>
<pre><code><a href='/constructor/jsonObjectValue'>jsonObjectValue</a>#c0de1bd9 key:<a href='/type/string'>string</a> value:<a href='/type/JSONValue'>JSONValue</a> = <a href='/type/JSONObjectValue'>JSONObjectValue</a>;
<a href='/constructor/jsonNull'>jsonNull</a>#3f6d7b68 = <a href='/type/JSONValue'>JSONValue</a>;
<a href='/constructor/jsonBool'>jsonBool</a>#c7345e6a value:<a href='/type/Bool'>Bool</a> = <a href='/type/JSONValue'>JSONValue</a>;
<a href='/constructor/jsonNumber'>jsonNumber</a>#2be0dfa4 value:<a href='/type/double'>double</a> = <a href='/type/JSONValue'>JSONValue</a>;
<a href='/constructor/jsonString'>jsonString</a>#b71e767a value:<a href='/type/string'>string</a> = <a href='/type/JSONValue'>JSONValue</a>;
<a href='/constructor/jsonArray'>jsonArray</a>#f7444763 value:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/JSONValue'>JSONValue</a>&gt; = <a href='/type/JSONValue'>JSONValue</a>;
<a href='/constructor/jsonObject'>jsonObject</a>#99c1d49d value:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/JSONObjectValue'>JSONObjectValue</a>&gt; = <a href='/type/JSONValue'>JSONValue</a>;
---functions---
<a href='/method/help.getAppConfig'>help.getAppConfig</a>#98914110 = <a href='/type/JSONValue'>JSONValue</a>;</code></pre>
<p>The <a href="/method/help.getAppConfig">help.getAppConfig</a> method returns a JSON object containing rapidly evolving, client-specific configuration parameters.<br>
While <a href="/method/help.getConfig">help.getConfig</a> returns MTProto-specific configuration with information about server-side limitations and other MTProto-related information, <a href="/method/help.getAppConfig">help.getAppConfig</a> returns configuration parameters useful for graphical Telegram clients.</p>
<p>Typical fields included in the resulting JSON object are: </p>
<ul>
<li><code>emojies_animated_zoom</code> - <a href="/api/animated-emojis">Animated emojis</a> and <a href="/api/dice">animated dice</a> should be scaled by this factor before being shown to the user (float)</li>
<li><code>keep_alive_service</code> - Whether app clients should start a keepalive service to keep the app running and fetch updates even when the app is closed (boolean)</li>
<li><code>background_connection</code> - Whether app clients should start a background TCP connection for MTProto update fetching (boolean)</li>
<li><code>emojies_send_dice</code> - A list of supported <a href="/api/dice">animated dice</a> stickers (array of strings).</li>
<li><code>emojies_send_dice_success</code> - For <a href="/api/dice">animated dice</a> emojis other than the basic <img class="emoji" src="//telegram.org/img/emoji/40/F09F8EB2.png" width="20" height="20" alt="🎲" />, indicates the winning dice value and the final frame of the animated sticker, at which to show the fireworks <img class="emoji" src="//telegram.org/img/emoji/40/F09F8E86.png" width="20" height="20" alt="🎆" /> (object with emoji keys and object values, containing <code>value</code> and <code>frame_start</code> float values)</li>
<li><code>emojies_sounds</code> - A map of soundbites to be played when the user clicks on the specified <a href="/api/animated-emojis">animated emoji</a>; the <a href="/api/file_reference">file reference field</a> should be base64-decoded before <a href="/api/files">downloading the file</a> (map of <a href="/api/files">file IDs</a>, with emoji string keys)</li>
<li><code>gif_search_branding</code> - Specifies the name of the service providing GIF search through <a href="#mtproto-configuration">gif_search_username</a> (string)</li>
<li><code>gif_search_emojies</code> - Specifies a list of emojies that should be suggested as search term in a bar above the GIF search box (array of string emojis)</li>
<li><code>qr_login_camera</code> - Whether the Settings-&gt;Devices menu should show an option to scan a <a href="/api/qr-login">QR login code</a> (boolean)</li>
<li><code>qr_login_code</code> - Whether the login screen should show a <a href="/api/qr-login">QR code login option</a>, possibly as default login method (string, "disabled", "primary" or "secondary")</li>
<li><code>dialog_filters_enabled</code> - Whether clients should show an option for managing <a href="/api/folders">dialog filters AKA folders</a> (boolean)</li>
<li><code>dialog_filters_tooltip</code> - Whether clients should actively show a tooltip, inviting the user to configure <a href="/api/folders">dialog filters AKA folders</a>; typically this happens when the chat list is long enough to start getting cluttered. (boolean)</li>
</ul>
<p>Example value: </p>
<pre><code>{
"test": 1,
"emojies_animated_zoom": 0.625,
"keep_alive_service": true,
"background_connection": true,
"emojies_send_dice": [
"\ud83c\udfb2",
"\ud83c\udfaf",
"\ud83c\udfc0",
"\u26bd",
"\u26bd\ufe0f",
"\ud83c\udfb0"
],
"emojies_send_dice_success": {
"\ud83c\udfaf": {
"value": 6,
"frame_start": 62
},
"\ud83c\udfc0": {
"value": 5,
"frame_start": 110
},
"\u26bd": {
"value": 5,
"frame_start": 110
},
"\u26bd\ufe0f": {
"value": 5,
"frame_start": 110
},
"\ud83c\udfb0": {
"value": 64,
"frame_start": 110
}
},
"emojies_sounds": {
"\ud83c\udf83": {
"id": "4956223179606458539",
"access_hash": "-2107001400913062971",
"file_reference_base64": "AF-4ApC7ukC0UWEPZN0TeSJURe7T"
},
"\u26b0": {
"id": "4956223179606458540",
"access_hash": "-1498869544183595185",
"file_reference_base64": "AF-4ApCLKMGt96WCvLm58kbqZHd3"
},
"\ud83e\udddf\u200d\u2642": {
"id": "4960929110848176331",
"access_hash": "3986395821757915468",
"file_reference_base64": "AF-4ApAedNln3IMEHH-SUQuH8L9g"
},
"\ud83e\udddf": {
"id": "4960929110848176332",
"access_hash": "-8929417974289765626",
"file_reference_base64": "AF-4ApArGURtGa2KVC-Yovh1kQoW"
},
"\ud83e\udddf\u200d\u2640": {
"id": "4960929110848176333",
"access_hash": "9161696144162881753",
"file_reference_base64": "AF-4ApD-eOqXvTBmcszAEkzQN615"
},
"\ud83c\udf51": {
"id": "4963180910661861548",
"access_hash": "-7431729439735063448",
"file_reference_base64": "AF-4ApBimvRxhcXg-iQ5Gw4Eelit"
},
"\u2764": {
"id": "4978826754966683841",
"access_hash": "3926211553285686901",
"file_reference_base64": "AF-4ApDBkyjgN2Tk9zJvXPhfJXPA"
}
},
"gif_search_branding": "tenor",
"gif_search_emojies": [
"\ud83d\udc4d",
"\ud83d\ude18",
"\ud83d\ude0d",
"\ud83d\ude21",
"\ud83e\udd73",
"\ud83d\ude02",
"\ud83d\ude2e",
"\ud83d\ude44",
"\ud83d\ude0e",
"\ud83d\udc4e"
],
"qr_login_camera": true,
"qr_login_code": "secondary",
"dialog_filters_enabled": true,
"dialog_filters_tooltip": false
}</code></pre>
<h2><a class="anchor" href="#app-specific-configuration" id="app-specific-configuration" name="app-specific-configuration"><i class="anchor-icon"></i></a>App-specific configuration</h2>
<pre><code><a href='/constructor/help.appUpdate'>help.appUpdate</a>#1da7158f flags:<a href='/type/%23'>#</a> can_not_skip:flags.0?<a href='/constructor/true'>true</a> id:<a href='/type/int'>int</a> version:<a href='/type/string'>string</a> text:<a href='/type/string'>string</a> entities:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/MessageEntity'>MessageEntity</a>&gt; document:flags.1?<a href='/type/Document'>Document</a> url:flags.2?<a href='/type/string'>string</a> = <a href='/type/help.AppUpdate'>help.AppUpdate</a>;
<a href='/constructor/help.noAppUpdate'>help.noAppUpdate</a>#c45a6536 = <a href='/type/help.AppUpdate'>help.AppUpdate</a>;
<a href='/constructor/updates'>updates</a>#74ae4240 updates:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/Update'>Update</a>&gt; users:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/User'>User</a>&gt; chats:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/Chat'>Chat</a>&gt; date:<a href='/type/int'>int</a> seq:<a href='/type/int'>int</a> = <a href='/type/Updates'>Updates</a>;
<a href='/constructor/updateServiceNotification'>updateServiceNotification</a>#ebe46819 flags:<a href='/type/%23'>#</a> popup:flags.0?<a href='/constructor/true'>true</a> inbox_date:flags.1?<a href='/type/int'>int</a> type:<a href='/type/string'>string</a> message:<a href='/type/string'>string</a> media:<a href='/type/MessageMedia'>MessageMedia</a> entities:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/MessageEntity'>MessageEntity</a>&gt; = <a href='/type/Update'>Update</a>;
<a href='/constructor/help.inviteText'>help.inviteText</a>#18cb9f78 message:<a href='/type/string'>string</a> = <a href='/type/help.InviteText'>help.InviteText</a>;
---functions---
<a href='/method/help.getAppUpdate'>help.getAppUpdate</a>#522d5a7d source:<a href='/type/string'>string</a> = <a href='/type/help.AppUpdate'>help.AppUpdate</a>;
<a href='/method/help.getAppChangelog'>help.getAppChangelog</a>#9010ef6f prev_app_version:<a href='/type/string'>string</a> = <a href='/type/Updates'>Updates</a>;
<a href='/method/help.getInviteText'>help.getInviteText</a>#4d392343 = <a href='/type/help.InviteText'>help.InviteText</a>;</code></pre>
<ul>
<li><a href="/method/help.getAppUpdate">help.getAppUpdate</a> - Get info about an application update, can contain the updated application binary in the attached document</li>
<li><a href="/method/help.getAppChangelog">help.getAppChangelog</a> - Get a list of service messages with app-specific changelogs</li>
<li><a href="/method/help.getInviteText">help.getInviteText</a> - Returns a localized invitation message that can be sent via SMS to contacts that haven't signed up to Telegram yet</li>
</ul>
<h2><a class="anchor" href="#terms-of-service" id="terms-of-service" name="terms-of-service"><i class="anchor-icon"></i></a>Terms of service</h2>
<pre><code><a href='/constructor/help.termsOfServiceUpdateEmpty'>help.termsOfServiceUpdateEmpty</a>#e3309f7f expires:<a href='/type/int'>int</a> = <a href='/type/help.TermsOfServiceUpdate'>help.TermsOfServiceUpdate</a>;
<a href='/constructor/help.termsOfServiceUpdate'>help.termsOfServiceUpdate</a>#28ecf961 expires:<a href='/type/int'>int</a> terms_of_service:<a href='/type/help.TermsOfService'>help.TermsOfService</a> = <a href='/type/help.TermsOfServiceUpdate'>help.TermsOfServiceUpdate</a>;
<a href='/constructor/help.termsOfService'>help.termsOfService</a>#780a0310 flags:<a href='/type/%23'>#</a> popup:flags.0?<a href='/constructor/true'>true</a> id:<a href='/type/DataJSON'>DataJSON</a> text:<a href='/type/string'>string</a> entities:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/MessageEntity'>MessageEntity</a>&gt; min_age_confirm:flags.1?<a href='/type/int'>int</a> = <a href='/type/help.TermsOfService'>help.TermsOfService</a>;
<a href='/constructor/auth.authorizationSignUpRequired'>auth.authorizationSignUpRequired</a>#44747e9a flags:<a href='/type/%23'>#</a> terms_of_service:flags.0?<a href='/type/help.TermsOfService'>help.TermsOfService</a> = <a href='/type/auth.Authorization'>auth.Authorization</a>;
---functions---
<a href='/method/help.getTermsOfServiceUpdate'>help.getTermsOfServiceUpdate</a>#2ca51fd1 = <a href='/type/help.TermsOfServiceUpdate'>help.TermsOfServiceUpdate</a>;
<a href='/method/help.acceptTermsOfService'>help.acceptTermsOfService</a>#ee72f79a id:<a href='/type/DataJSON'>DataJSON</a> = <a href='/type/Bool'>Bool</a>;
<a href='/method/auth.signIn'>auth.signIn</a>#bcd51581 phone_number:<a href='/type/string'>string</a> phone_code_hash:<a href='/type/string'>string</a> phone_code:<a href='/type/string'>string</a> = <a href='/type/auth.Authorization'>auth.Authorization</a>;
<a href='/method/account.deleteAccount'>account.deleteAccount</a>#418d4e0b reason:<a href='/type/string'>string</a> = <a href='/type/Bool'>Bool</a>;</code></pre>
<p>These methods can be used for managing consent to Telegram's <a href="https://telegram.org/tos">Terms Of Service</a>. </p>
<p>Typically, before a user <a href="/api/auth#sign-insign-up">signs up</a> by invoking <a href="/method/auth.signUp">auth.signUp</a>, apps should show a pop-up (if the <code>popup</code> flag of the <a href="/constructor/help.termsOfService">help.termsOfService</a> method is set), asking the user to accept Telegram's terms of service; in case of denial, the user is to be returned to the initial page of the login flow. </p>
<p>When signing up for the first time, the <a href="/constructor/help.termsOfService">help.termsOfService</a> is to be obtained from the <a href="/constructor/auth.authorizationSignUpRequired">auth.authorizationSignUpRequired</a> constructor returned by the <a href="/method/auth.signIn">auth.signIn</a>. </p>
<p>After signing up, or when logging in as an existing user, apps are supposed to call <a href="/method/help.getTermsOfServiceUpdate">help.getTermsOfServiceUpdate</a> to check for any updates to the Terms of Service; this call should be repeated after <code>expires</code> seconds have elapsed.<br>
If an update to the Terms Of Service is available, clients are supposed to show a consent popup; if accepted, clients should call <a href="/method/help.acceptTermsOfService">help.acceptTermsOfService</a>, providing the <a href="/constructor/help.termsOfService">termsOfService <code>id</code> JSON object</a>; in case of denial, clients are to delete the account using <a href="/method/account.deleteAccount">account.deleteAccount</a>, providing <code>Decline ToS update</code> as deletion <code>reason</code>. </p>
<p>Example implementation: <a href="https://github.com/DrKLO/Telegram/blob/dbf81a34affcd1c24d78e1403347ea8b3a186154/TMessagesProj/src/main/java/org/telegram/ui/LoginActivity.java#L3510">android (signup)</a>, <a href="https://github.com/DrKLO/Telegram/blob/ed9e38da5b3b6ca80a7cb719a000d310d07497b0/TMessagesProj/src/main/java/org/telegram/ui/Components/TermsOfServiceView.java">android (after login)</a></p>
<h2><a class="anchor" href="#telegram-support-info" id="telegram-support-info" name="telegram-support-info"><i class="anchor-icon"></i></a>Telegram support info</h2>
<pre><code><a href='/constructor/user'>user</a>#938458c1 flags:<a href='/type/%23'>#</a> self:flags.10?<a href='/constructor/true'>true</a> contact:flags.11?<a href='/constructor/true'>true</a> mutual_contact:flags.12?<a href='/constructor/true'>true</a> deleted:flags.13?<a href='/constructor/true'>true</a> bot:flags.14?<a href='/constructor/true'>true</a> bot_chat_history:flags.15?<a href='/constructor/true'>true</a> bot_nochats:flags.16?<a href='/constructor/true'>true</a> verified:flags.17?<a href='/constructor/true'>true</a> restricted:flags.18?<a href='/constructor/true'>true</a> min:flags.20?<a href='/constructor/true'>true</a> bot_inline_geo:flags.21?<a href='/constructor/true'>true</a> support:flags.23?<a href='/constructor/true'>true</a> scam:flags.24?<a href='/constructor/true'>true</a> apply_min_photo:flags.25?<a href='/constructor/true'>true</a> id:<a href='/type/int'>int</a> access_hash:flags.0?<a href='/type/long'>long</a> first_name:flags.1?<a href='/type/string'>string</a> last_name:flags.2?<a href='/type/string'>string</a> username:flags.3?<a href='/type/string'>string</a> phone:flags.4?<a href='/type/string'>string</a> photo:flags.5?<a href='/type/UserProfilePhoto'>UserProfilePhoto</a> status:flags.6?<a href='/type/UserStatus'>UserStatus</a> bot_info_version:flags.14?<a href='/type/int'>int</a> restriction_reason:flags.18?<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/RestrictionReason'>RestrictionReason</a>&gt; bot_inline_placeholder:flags.19?<a href='/type/string'>string</a> lang_code:flags.22?<a href='/type/string'>string</a> = <a href='/type/User'>User</a>;
<a href='/constructor/help.support'>help.support</a>#17c6b5f6 phone_number:<a href='/type/string'>string</a> user:<a href='/type/User'>User</a> = <a href='/type/help.Support'>help.Support</a>;
<a href='/constructor/help.supportName'>help.supportName</a>#8c05f1c9 name:<a href='/type/string'>string</a> = <a href='/type/help.SupportName'>help.SupportName</a>;
---functions---
<a href='/method/help.getSupport'>help.getSupport</a>#9cdf08cd = <a href='/type/help.Support'>help.Support</a>;
<a href='/method/help.getSupportName'>help.getSupportName</a>#d360e72c = <a href='/type/help.SupportName'>help.SupportName</a>;</code></pre>
<p>These methods can be used for fetching info about Telegram's support user, that users can use to get support and ask questions about the app. </p>
<ul>
<li><a href="/method/help.getSupport">help.getSupport</a> - Will return the <a href="/constructor/user">user</a> object that can be used for contacting support.</li>
<li><a href="/method/help.getSupportName">help.getSupportName</a> - Will return a localized name for the support chat.</li>
</ul>
<h2><a class="anchor" href="#country-information-and-login-phone-patterns" id="country-information-and-login-phone-patterns" name="country-information-and-login-phone-patterns"><i class="anchor-icon"></i></a>Country information and login phone patterns</h2>
<pre><code><a href='/constructor/help.countryCode'>help.countryCode</a>#4203c5ef flags:<a href='/type/%23'>#</a> country_code:<a href='/type/string'>string</a> prefixes:flags.0?<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/string'>string</a>&gt; patterns:flags.1?<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/string'>string</a>&gt; = <a href='/type/help.CountryCode'>help.CountryCode</a>;
<a href='/constructor/help.country'>help.country</a>#c3878e23 flags:<a href='/type/%23'>#</a> hidden:flags.0?<a href='/constructor/true'>true</a> iso2:<a href='/type/string'>string</a> default_name:<a href='/type/string'>string</a> name:flags.1?<a href='/type/string'>string</a> country_codes:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/help.CountryCode'>help.CountryCode</a>&gt; = <a href='/type/help.Country'>help.Country</a>;
<a href='/constructor/help.countriesListNotModified'>help.countriesListNotModified</a>#93cc1f32 = <a href='/type/help.CountriesList'>help.CountriesList</a>;
<a href='/constructor/help.countriesList'>help.countriesList</a>#87d0759e countries:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/help.Country'>help.Country</a>&gt; hash:<a href='/type/int'>int</a> = <a href='/type/help.CountriesList'>help.CountriesList</a>;
---functions---
<a href='/method/help.getCountriesList'>help.getCountriesList</a>#735787a8 lang_code:<a href='/type/string'>string</a> hash:<a href='/type/int'>int</a> = <a href='/type/help.CountriesList'>help.CountriesList</a>;</code></pre>
<p><a href="/method/help.getCountriesList">help.getCountriesList</a> can be used to fetch a list of localized names for all available countries and phone code patterns for logging in. </p>
<p>The phone code pattern should be used when showing the <a href="/api/auth">login</a> screen, or when changing phone number: for example, a pattern value of <code>XXX XXX XXX</code> with <code>country_code</code> <code>+39</code> indicates that the phone field for login should accept a spaced pattern like <code>+39 123 456 789</code>.<br>
Also, the beginning of the national part of the phone number (<code>123 456 789</code>) should with match one of the <code>prefixes</code>, if any were returned. </p></div>
</div>
</div>
</div>
<div class="footer_wrap">
<div class="footer_columns_wrap footer_desktop">
<div class="footer_column footer_column_telegram">
<h5>Telegram</h5>
<div class="footer_telegram_description"></div>
Telegram is a cloud-based mobile and desktop messaging app with a focus on security and speed.
</div>
<div class="footer_column">
<h5><a href="//telegram.org/faq">About</a></h5>
<ul>
<li><a href="//telegram.org/faq">FAQ</a></li>
<li><a href="//telegram.org/blog">Blog</a></li>
<li><a href="//telegram.org/jobs">Jobs</a></li>
</ul>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps#mobile-apps">Mobile Apps</a></h5>
<ul>
<li><a href="//telegram.org/dl/ios">iPhone/iPad</a></li>
<li><a href="//telegram.org/dl/android">Android</a></li>
<li><a href="//telegram.org/dl/wp">Windows Phone</a></li>
</ul>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps#desktop-apps">Desktop Apps</a></h5>
<ul>
<li><a href="//desktop.telegram.org/">PC/Mac/Linux</a></li>
<li><a href="//macos.telegram.org/">macOS</a></li>
<li><a href="//telegram.org/dl/web">Web-browser</a></li>
</ul>
</div>
<div class="footer_column footer_column_platform">
<h5><a href="/">Platform</a></h5>
<ul>
<li><a href="/api">API</a></li>
<li><a href="//translations.telegram.org/">Translations</a></li>
<li><a href="//instantview.telegram.org/">Instant View</a></li>
</ul>
</div>
</div>
<div class="footer_columns_wrap footer_mobile">
<div class="footer_column">
<h5><a href="//telegram.org/faq">About</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/blog">Blog</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps">Apps</a></h5>
</div>
<div class="footer_column">
<h5><a href="/">Platform</a></h5>
</div>
<div class="footer_column">
<h5><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)">Twitter</a></h5>
</div>
</div>
</div>
</div>
<script src="/js/main.js?42"></script>
<script src="/js/jquery.min.js?1"></script>
<script src="/js/bootstrap.min.js"></script>
<script>window.initDevPageNav&&initDevPageNav();
backToTopInit("Go up");
removePreloadInit();
</script>
</body>
</html>
<!-- page generated in 11.69ms -->

View file

@ -0,0 +1,151 @@
<!DOCTYPE html>
<html class="">
<head>
<meta charset="utf-8">
<title>Working with Different Data Centers</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="How to connect to the closest DC access point for faster interaction with the API, and things to watch out for when developing a client.">
<meta property="og:title" content="Working with Different Data Centers">
<meta property="og:image" content="5bb32ac46255f88a6c">
<meta property="og:description" content="How to connect to the closest DC access point for faster interaction with the API, and things to watch out for when developing a client.">
<link rel="shortcut icon" href="/favicon.ico?4" type="image/x-icon" />
<link href="/css/bootstrap.min.css?3" rel="stylesheet">
<link href="/css/telegram.css?212" rel="stylesheet" media="screen">
<style>
</style>
</head>
<body class="preload">
<div class="dev_page_wrap">
<div class="dev_page_head navbar navbar-static-top navbar-tg">
<div class="navbar-inner">
<div class="container clearfix">
<ul class="nav navbar-nav navbar-right hidden-xs"><li class="navbar-twitter"><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)"><i class="icon icon-twitter"></i><span> Twitter</span></a></li></ul>
<ul class="nav navbar-nav">
<li><a href="//telegram.org/">Home</a></li>
<li class="hidden-xs"><a href="//telegram.org/faq">FAQ</a></li>
<li class="hidden-xs"><a href="//telegram.org/apps">Apps</a></li>
<li class="active"><a href="/api">API</a></li>
<li class=""><a href="/mtproto">Protocol</a></li>
<li class=""><a href="/schema">Schema</a></li>
</ul>
</div>
</div>
</div>
<div class="container clearfix">
<div class="dev_page">
<div id="dev_page_content_wrap" class=" ">
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/api/datacenter" >Working with Different Data Centers</a></li></ul></div>
<h1 id="dev_page_title">Working with Different Data Centers</h1>
<div id="dev_page_content"><p>The servers are divided into several data centers (hereinafter “DCs”) in different parts of the world.
A complete list of proxy access points for these DCs may be obtained using <a href="/method/help.getConfig">help.getConfig</a>:</p>
<pre><code><a href='/constructor/dcOption'>dcOption</a>#18b7a10d flags:<a href='/type/%23'>#</a> ipv6:flags.0?<a href='/constructor/true'>true</a> media_only:flags.1?<a href='/constructor/true'>true</a> tcpo_only:flags.2?<a href='/constructor/true'>true</a> cdn:flags.3?<a href='/constructor/true'>true</a> static:flags.4?<a href='/constructor/true'>true</a> id:<a href='/type/int'>int</a> ip_address:<a href='/type/string'>string</a> port:<a href='/type/int'>int</a> secret:flags.10?<a href='/type/bytes'>bytes</a> = <a href='/type/DcOption'>DcOption</a>;
<a href='/constructor/config'>config</a>#330b4067 flags:<a href='/type/%23'>#</a> phonecalls_enabled:flags.1?<a href='/constructor/true'>true</a> default_p2p_contacts:flags.3?<a href='/constructor/true'>true</a> preload_featured_stickers:flags.4?<a href='/constructor/true'>true</a> ignore_phone_entities:flags.5?<a href='/constructor/true'>true</a> revoke_pm_inbox:flags.6?<a href='/constructor/true'>true</a> blocked_mode:flags.8?<a href='/constructor/true'>true</a> pfs_enabled:flags.13?<a href='/constructor/true'>true</a> date:<a href='/type/int'>int</a> expires:<a href='/type/int'>int</a> test_mode:<a href='/type/Bool'>Bool</a> this_dc:<a href='/type/int'>int</a> dc_options:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/DcOption'>DcOption</a>&gt; dc_txt_domain_name:<a href='/type/string'>string</a> chat_size_max:<a href='/type/int'>int</a> megagroup_size_max:<a href='/type/int'>int</a> forwarded_count_max:<a href='/type/int'>int</a> online_update_period_ms:<a href='/type/int'>int</a> offline_blur_timeout_ms:<a href='/type/int'>int</a> offline_idle_timeout_ms:<a href='/type/int'>int</a> online_cloud_timeout_ms:<a href='/type/int'>int</a> notify_cloud_delay_ms:<a href='/type/int'>int</a> notify_default_delay_ms:<a href='/type/int'>int</a> push_chat_period_ms:<a href='/type/int'>int</a> push_chat_limit:<a href='/type/int'>int</a> saved_gifs_limit:<a href='/type/int'>int</a> edit_time_limit:<a href='/type/int'>int</a> revoke_time_limit:<a href='/type/int'>int</a> revoke_pm_time_limit:<a href='/type/int'>int</a> rating_e_decay:<a href='/type/int'>int</a> stickers_recent_limit:<a href='/type/int'>int</a> stickers_faved_limit:<a href='/type/int'>int</a> channels_read_media_period:<a href='/type/int'>int</a> tmp_sessions:flags.0?<a href='/type/int'>int</a> pinned_dialogs_count_max:<a href='/type/int'>int</a> pinned_infolder_count_max:<a href='/type/int'>int</a> call_receive_timeout_ms:<a href='/type/int'>int</a> call_ring_timeout_ms:<a href='/type/int'>int</a> call_connect_timeout_ms:<a href='/type/int'>int</a> call_packet_timeout_ms:<a href='/type/int'>int</a> me_url_prefix:<a href='/type/string'>string</a> autoupdate_url_prefix:flags.7?<a href='/type/string'>string</a> gif_search_username:flags.9?<a href='/type/string'>string</a> venue_search_username:flags.10?<a href='/type/string'>string</a> img_search_username:flags.11?<a href='/type/string'>string</a> static_maps_provider:flags.12?<a href='/type/string'>string</a> caption_length_max:<a href='/type/int'>int</a> message_length_max:<a href='/type/int'>int</a> webfile_dc_id:<a href='/type/int'>int</a> suggested_lang_code:flags.2?<a href='/type/string'>string</a> lang_pack_version:flags.2?<a href='/type/int'>int</a> base_lang_pack_version:flags.2?<a href='/type/int'>int</a> = <a href='/type/Config'>Config</a>;
---functions---
<a href='/method/help.getConfig'>help.getConfig</a>#c4f9186b = <a href='/type/Config'>Config</a>;</code></pre>
<p>In this context, <strong>this_dc</strong> is the number of the current DC, <strong>dc_options</strong> is a list of all DCs available at the moment, each of which has an <strong>id</strong>, <strong>ip</strong>, and <strong>port</strong> for establishing a connection. Please note that <strong>ip</strong> and <strong>port</strong> may change frequently, based on proxy server load and the user's current location.</p>
<p>To optimize client communication with the API, each client must use the connection to the closest access point for its main queries (sending messages, getting contacts, etc.). Therefore, knowing how to select a DC is required before communicating with the API.</p>
<h3><a class="anchor" href="#registrationauthorization" id="registrationauthorization" name="registrationauthorization"><i class="anchor-icon"></i></a>Registration/Authorization</h3>
<p>The <a href="/method/auth.sendCode">auth.sendCode</a> method is the basic entry point when registering a new user or authorizing an existing user. 95% of all redirection cases to a different DC will occure when invoking this method.</p>
<p>The client does not yet know which DC it will be associated with; therefore, it establishes an encrypted connection to a random address and sends its query to that address.
Having received a <strong>phone_number</strong> from a client, we can find out whether or not it is registered in the system. If it is, then, if necessary, instead of sending a text message, we request that it establish a connection with a different DC first (PHONE_MIGRATE_X error).
If we do not yet have a user with this number, we examine its IP-address. We can use it to identify the closest DC. Again, if necessary, we redirect the user to a different DC (NETWORK_MIGRATE_X error).</p>
<h4><a class="anchor" href="#testing-redirects" id="testing-redirects" name="testing-redirects"><i class="anchor-icon"></i></a>Testing Redirects</h4>
<p>There are reserved phone number prefixes to test the correctness of the applications handling of redirects between DCs. Read more in <a href="https://core.telegram.org/api/auth#test-phone-numbers">User Authorization</a> article.</p>
<h3><a class="anchor" href="#file-access" id="file-access" name="file-access"><i class="anchor-icon"></i></a>File Access</h3>
<p>A file saved by a user with <a href="/method/upload.saveFilePart">upload.saveFilePart</a> will be available for direct download only from the DC where the query was executed. That is why each file has a <strong>dc_id</strong> parameter:</p>
<pre><code><a href='/constructor/document'>document</a>#1e87342b flags:<a href='/type/%23'>#</a> id:<a href='/type/long'>long</a> access_hash:<a href='/type/long'>long</a> file_reference:<a href='/type/bytes'>bytes</a> date:<a href='/type/int'>int</a> mime_type:<a href='/type/string'>string</a> size:<a href='/type/int'>int</a> thumbs:flags.0?<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/PhotoSize'>PhotoSize</a>&gt; video_thumbs:flags.1?<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/VideoSize'>VideoSize</a>&gt; dc_id:<a href='/type/int'>int</a> attributes:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/DocumentAttribute'>DocumentAttribute</a>&gt; = <a href='/type/Document'>Document</a>;
<a href='/constructor/photo'>photo</a>#fb197a65 flags:<a href='/type/%23'>#</a> has_stickers:flags.0?<a href='/constructor/true'>true</a> id:<a href='/type/long'>long</a> access_hash:<a href='/type/long'>long</a> file_reference:<a href='/type/bytes'>bytes</a> date:<a href='/type/int'>int</a> sizes:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/PhotoSize'>PhotoSize</a>&gt; video_sizes:flags.1?<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/VideoSize'>VideoSize</a>&gt; dc_id:<a href='/type/int'>int</a> = <a href='/type/Photo'>Photo</a>;
<a href='/constructor/encryptedFile'>encryptedFile</a>#4a70994c id:<a href='/type/long'>long</a> access_hash:<a href='/type/long'>long</a> size:<a href='/type/int'>int</a> dc_id:<a href='/type/int'>int</a> key_fingerprint:<a href='/type/int'>int</a> = <a href='/type/EncryptedFile'>EncryptedFile</a>;
<a href='/constructor/userProfilePhoto'>userProfilePhoto</a>#69d3ab26 flags:<a href='/type/%23'>#</a> has_video:flags.0?<a href='/constructor/true'>true</a> photo_id:<a href='/type/long'>long</a> photo_small:<a href='/type/FileLocation'>FileLocation</a> photo_big:<a href='/type/FileLocation'>FileLocation</a> dc_id:<a href='/type/int'>int</a> = <a href='/type/UserProfilePhoto'>UserProfilePhoto</a>;
<a href='/constructor/chatPhoto'>chatPhoto</a>#d20b9f3c flags:<a href='/type/%23'>#</a> has_video:flags.0?<a href='/constructor/true'>true</a> photo_small:<a href='/type/FileLocation'>FileLocation</a> photo_big:<a href='/type/FileLocation'>FileLocation</a> dc_id:<a href='/type/int'>int</a> = <a href='/type/ChatPhoto'>ChatPhoto</a>;</code></pre>
<p>To download the file, an encrypted connection to DC <strong>dc_id</strong> must be established and used to execute the <a href="/method/upload.getFile">upload.getFile</a> query.
If an attempt is made to download the file over a wrong connection, the FILE_MIGRATE_X error will be returned.</p>
<p>Please note that encryption keys are not copied between DCs; therefore, the process of establishing an encrypted connection is started from the very beginning for each new DC. An issued auth_key can be associated with the current authorized user by using an <a href="#authorization-transfer">authorization transfer</a>.</p>
<h3><a class="anchor" href="#user-migration" id="user-migration" name="user-migration"><i class="anchor-icon"></i></a>User Migration</h3>
<p>During the process of working with the API, user information is accumulated in the DC with which the user is associated. This is the reason a user cannot be associated with a different DC by means of the client. However, in the future, during prolonged communication from an unusual location, we may decide that the users data must be moved to a different DC. After some time, the data will be copied and the association will be updated. Once this happens, when executing any query transmitted to the old DC, the API will return the USER_MIGRATE_X error. The client will then have to establish a connection with the new DC and repeat the query.</p>
<h3><a class="anchor" href="#authorization-transfer" id="authorization-transfer" name="authorization-transfer"><i class="anchor-icon"></i></a>Authorization Transfer</h3>
<p>The following methods can be used to eliminate the need for users to enter the code from a text message every time:</p>
<pre><code><a href='/constructor/auth.exportedAuthorization'>auth.exportedAuthorization</a>#df969c2d id:<a href='/type/int'>int</a> bytes:<a href='/type/bytes'>bytes</a> = <a href='/type/auth.ExportedAuthorization'>auth.ExportedAuthorization</a>;
<a href='/constructor/auth.authorization'>auth.authorization</a>#cd050916 flags:<a href='/type/%23'>#</a> tmp_sessions:flags.0?<a href='/type/int'>int</a> user:<a href='/type/User'>User</a> = <a href='/type/auth.Authorization'>auth.Authorization</a>;
---functions---
<a href='/method/auth.importAuthorization'>auth.importAuthorization</a>#e3ef9613 id:<a href='/type/int'>int</a> bytes:<a href='/type/bytes'>bytes</a> = <a href='/type/auth.Authorization'>auth.Authorization</a>;
<a href='/method/auth.exportAuthorization'>auth.exportAuthorization</a>#e5bfffcd dc_id:<a href='/type/int'>int</a> = <a href='/type/auth.ExportedAuthorization'>auth.ExportedAuthorization</a>;</code></pre>
<p><a href="/method/auth.exportAuthorization">auth.exportAuthorization</a> must be executed in the current DC (the DC with which a connection has already been established), passing in <strong>dc_id</strong> as the value for the new DC. The method should return the user identifier and a long string of random data. An import operation can be performed at the new DC by sending it what was received. Queries requiring authorization can then be successfully executed in the new DC.</p></div>
</div>
</div>
</div>
<div class="footer_wrap">
<div class="footer_columns_wrap footer_desktop">
<div class="footer_column footer_column_telegram">
<h5>Telegram</h5>
<div class="footer_telegram_description"></div>
Telegram is a cloud-based mobile and desktop messaging app with a focus on security and speed.
</div>
<div class="footer_column">
<h5><a href="//telegram.org/faq">About</a></h5>
<ul>
<li><a href="//telegram.org/faq">FAQ</a></li>
<li><a href="//telegram.org/blog">Blog</a></li>
<li><a href="//telegram.org/jobs">Jobs</a></li>
</ul>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps#mobile-apps">Mobile Apps</a></h5>
<ul>
<li><a href="//telegram.org/dl/ios">iPhone/iPad</a></li>
<li><a href="//telegram.org/dl/android">Android</a></li>
<li><a href="//telegram.org/dl/wp">Windows Phone</a></li>
</ul>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps#desktop-apps">Desktop Apps</a></h5>
<ul>
<li><a href="//desktop.telegram.org/">PC/Mac/Linux</a></li>
<li><a href="//macos.telegram.org/">macOS</a></li>
<li><a href="//telegram.org/dl/web">Web-browser</a></li>
</ul>
</div>
<div class="footer_column footer_column_platform">
<h5><a href="/">Platform</a></h5>
<ul>
<li><a href="/api">API</a></li>
<li><a href="//translations.telegram.org/">Translations</a></li>
<li><a href="//instantview.telegram.org/">Instant View</a></li>
</ul>
</div>
</div>
<div class="footer_columns_wrap footer_mobile">
<div class="footer_column">
<h5><a href="//telegram.org/faq">About</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/blog">Blog</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps">Apps</a></h5>
</div>
<div class="footer_column">
<h5><a href="/">Platform</a></h5>
</div>
<div class="footer_column">
<h5><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)">Twitter</a></h5>
</div>
</div>
</div>
</div>
<script src="/js/main.js?42"></script>
<script>backToTopInit("Go up");
removePreloadInit();
</script>
</body>
</html>
<!-- page generated in 8.45ms -->

View file

@ -0,0 +1,149 @@
<!DOCTYPE html>
<html class="">
<head>
<meta charset="utf-8">
<title>Dice</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="Telegram supports sending [animated dice](https://telegram.org/blog/folders#and-one-more-thing) emojis.">
<meta property="og:title" content="Dice">
<meta property="og:image" content="">
<meta property="og:description" content="Telegram supports sending [animated dice](https://telegram.org/blog/folders#and-one-more-thing) emojis.">
<link rel="shortcut icon" href="/favicon.ico?4" type="image/x-icon" />
<link href="/css/bootstrap.min.css?3" rel="stylesheet">
<link href="/css/telegram.css?212" rel="stylesheet" media="screen">
<style>
</style>
</head>
<body class="preload">
<div class="dev_page_wrap">
<div class="dev_page_head navbar navbar-static-top navbar-tg">
<div class="navbar-inner">
<div class="container clearfix">
<ul class="nav navbar-nav navbar-right hidden-xs"><li class="navbar-twitter"><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)"><i class="icon icon-twitter"></i><span> Twitter</span></a></li></ul>
<ul class="nav navbar-nav">
<li><a href="//telegram.org/">Home</a></li>
<li class="hidden-xs"><a href="//telegram.org/faq">FAQ</a></li>
<li class="hidden-xs"><a href="//telegram.org/apps">Apps</a></li>
<li class="active"><a href="/api">API</a></li>
<li class=""><a href="/mtproto">Protocol</a></li>
<li class=""><a href="/schema">Schema</a></li>
</ul>
</div>
</div>
</div>
<div class="container clearfix">
<div class="dev_page">
<div id="dev_page_content_wrap" class=" ">
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/api/dice" >Dice</a></li></ul></div>
<h1 id="dev_page_title">Dice</h1>
<div id="dev_page_content"><p>Telegram supports sending <a href="https://telegram.org/blog/folders#and-one-more-thing">animated dice</a> emojis.<br>
This is implemented by using the dice constructors: </p>
<pre><code><a href='/constructor/inputMediaDice'>inputMediaDice</a>#e66fbf7b emoticon:<a href='/type/string'>string</a> = <a href='/type/InputMedia'>InputMedia</a>;
<a href='/constructor/messageMediaDice'>messageMediaDice</a>#3f7ee58b value:<a href='/type/int'>int</a> emoticon:<a href='/type/string'>string</a> = <a href='/type/MessageMedia'>MessageMedia</a>;
<a href='/constructor/inputStickerSetDice'>inputStickerSetDice</a>#e67f520e emoticon:<a href='/type/string'>string</a> = <a href='/type/InputStickerSet'>InputStickerSet</a>;
<a href='/constructor/messages.stickerSet'>messages.stickerSet</a>#b60a24a6 set:<a href='/type/StickerSet'>StickerSet</a> packs:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/StickerPack'>StickerPack</a>&gt; documents:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/Document'>Document</a>&gt; = <a href='/type/messages.StickerSet'>messages.StickerSet</a>;
---functions---
<a href='/method/messages.sendMedia'>messages.sendMedia</a>#3491eba9 flags:<a href='/type/%23'>#</a> silent:flags.5?<a href='/constructor/true'>true</a> background:flags.6?<a href='/constructor/true'>true</a> clear_draft:flags.7?<a href='/constructor/true'>true</a> peer:<a href='/type/InputPeer'>InputPeer</a> reply_to_msg_id:flags.0?<a href='/type/int'>int</a> media:<a href='/type/InputMedia'>InputMedia</a> message:<a href='/type/string'>string</a> random_id:<a href='/type/long'>long</a> reply_markup:flags.2?<a href='/type/ReplyMarkup'>ReplyMarkup</a> entities:flags.3?<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/MessageEntity'>MessageEntity</a>&gt; schedule_date:flags.10?<a href='/type/int'>int</a> = <a href='/type/Updates'>Updates</a>;
<a href='/method/messages.getStickerSet'>messages.getStickerSet</a>#2619a90e stickerset:<a href='/type/InputStickerSet'>InputStickerSet</a> = <a href='/type/messages.StickerSet'>messages.StickerSet</a>;
<a href='/method/help.getAppConfig'>help.getAppConfig</a>#98914110 = <a href='/type/JSONValue'>JSONValue</a>;</code></pre>
<p>On startup, clients should fetch <a href="/api/config#client-configuration">app configuration using help.getAppConfig</a>.<br>
Then, for each dice emoji contained in the <code>emojies_send_dice</code> field, clients should fetch the dice emoji stickerset by calling the <a href="/method/messages.getStickerSet">messages.getStickerSet</a> method, providing the properly populated <a href="/constructor/inputStickerSetDice">inputStickerSetDice</a> to the <code>stickerset</code> field.<br>
The returned stickerset will contain a set of animated stickers, one for each of the dice outcomes, plus a first looping sticker that should be shown as preview to the user before actually sending the dice. </p>
<p>If a user attempts to send a single emoji from the ones specified in <code>emojies_send_dice</code>, the dice should be sent using <a href="/method/messages.sendMedia">messages.sendMedia</a>, providing the dice emoji to the <code>emoticon</code> field. </p>
<p>Incoming dice stickers will be received as a <a href="/constructor/messageMediaDice">messageMediaDice</a> constructor, along with a randomly generated server-side value, ranging from 1 to the maximum allowed value for this type of dice.<br>
Clients should display the correct dice animated sticker for the specified value: since dice values start from 1, and the first animated sticker in dice stickerset is the preview, <code>value</code> can be used to directly index the <code>documents</code> sticker array from the animated stickerset. </p>
<p>The <code>emojies_send_dice_success</code> configuration parameter contains more info about dice emojis other than the basic <img class="emoji" src="//telegram.org/img/emoji/40/F09F8EB2.png" width="20" height="20" alt="🎲" />: </p>
<pre><code> "emojies_send_dice_success": {
"\ud83c\udfaf": {
"value": 6,
"frame_start": 62
},
"\ud83c\udfc0": {
"value": 5,
"frame_start": 110
}
}</code></pre>
<p>For each of the dice emojis, a maximum "winning" value is specified, along with the frame number at which to show the fireworks <img class="emoji" src="//telegram.org/img/emoji/40/F09F8E86.png" width="20" height="20" alt="🎆" />.<br>
Please note that dice animated stickers should loop only once, right after being sent/received <strong>for the first time</strong>; clicking on the dice sticker should bring up a popup, inviting the user to send a new dice of the same type. </p></div>
</div>
</div>
</div>
<div class="footer_wrap">
<div class="footer_columns_wrap footer_desktop">
<div class="footer_column footer_column_telegram">
<h5>Telegram</h5>
<div class="footer_telegram_description"></div>
Telegram is a cloud-based mobile and desktop messaging app with a focus on security and speed.
</div>
<div class="footer_column">
<h5><a href="//telegram.org/faq">About</a></h5>
<ul>
<li><a href="//telegram.org/faq">FAQ</a></li>
<li><a href="//telegram.org/blog">Blog</a></li>
<li><a href="//telegram.org/jobs">Jobs</a></li>
</ul>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps#mobile-apps">Mobile Apps</a></h5>
<ul>
<li><a href="//telegram.org/dl/ios">iPhone/iPad</a></li>
<li><a href="//telegram.org/dl/android">Android</a></li>
<li><a href="//telegram.org/dl/wp">Windows Phone</a></li>
</ul>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps#desktop-apps">Desktop Apps</a></h5>
<ul>
<li><a href="//desktop.telegram.org/">PC/Mac/Linux</a></li>
<li><a href="//macos.telegram.org/">macOS</a></li>
<li><a href="//telegram.org/dl/web">Web-browser</a></li>
</ul>
</div>
<div class="footer_column footer_column_platform">
<h5><a href="/">Platform</a></h5>
<ul>
<li><a href="/api">API</a></li>
<li><a href="//translations.telegram.org/">Translations</a></li>
<li><a href="//instantview.telegram.org/">Instant View</a></li>
</ul>
</div>
</div>
<div class="footer_columns_wrap footer_mobile">
<div class="footer_column">
<h5><a href="//telegram.org/faq">About</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/blog">Blog</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps">Apps</a></h5>
</div>
<div class="footer_column">
<h5><a href="/">Platform</a></h5>
</div>
<div class="footer_column">
<h5><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)">Twitter</a></h5>
</div>
</div>
</div>
</div>
<script src="/js/main.js?42"></script>
<script>backToTopInit("Go up");
removePreloadInit();
</script>
</body>
</html>
<!-- page generated in 19.9ms -->

View file

@ -0,0 +1,151 @@
<!DOCTYPE html>
<html class="">
<head>
<meta charset="utf-8">
<title>Discussion groups</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="[Groups](/api/channel) can be associated to a [channel](/api/channel) as a [discussion group](https://telegram.org/blog/privacy-discussions-web-bots), to allow users to discuss about posts.">
<meta property="og:title" content="Discussion groups">
<meta property="og:image" content="">
<meta property="og:description" content="[Groups](/api/channel) can be associated to a [channel](/api/channel) as a [discussion group](https://telegram.org/blog/privacy-discussions-web-bots), to allow users to discuss about posts.">
<link rel="shortcut icon" href="/favicon.ico?4" type="image/x-icon" />
<link href="/css/bootstrap.min.css?3" rel="stylesheet">
<link href="/css/telegram.css?212" rel="stylesheet" media="screen">
<style>
</style>
</head>
<body class="preload">
<div class="dev_page_wrap">
<div class="dev_page_head navbar navbar-static-top navbar-tg">
<div class="navbar-inner">
<div class="container clearfix">
<ul class="nav navbar-nav navbar-right hidden-xs"><li class="navbar-twitter"><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)"><i class="icon icon-twitter"></i><span> Twitter</span></a></li></ul>
<ul class="nav navbar-nav">
<li><a href="//telegram.org/">Home</a></li>
<li class="hidden-xs"><a href="//telegram.org/faq">FAQ</a></li>
<li class="hidden-xs"><a href="//telegram.org/apps">Apps</a></li>
<li class="active"><a href="/api">API</a></li>
<li class=""><a href="/mtproto">Protocol</a></li>
<li class=""><a href="/schema">Schema</a></li>
</ul>
</div>
</div>
</div>
<div class="container clearfix">
<div class="dev_page">
<div id="dev_page_content_wrap" class=" ">
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/api/discussion" >Discussion groups</a></li></ul></div>
<h1 id="dev_page_title">Discussion groups</h1>
<div id="dev_page_content"><!-- scroll_nav -->
<p><a href="/api/channel">Groups</a> can be associated to a <a href="/api/channel">channel</a> as a <a href="https://telegram.org/blog/privacy-discussions-web-bots">discussion group</a>, to allow users to discuss about posts. </p>
<pre><code><a href='/constructor/boolFalse'>boolFalse</a>#bc799737 = <a href='/type/Bool'>Bool</a>;
<a href='/constructor/boolTrue'>boolTrue</a>#997275b5 = <a href='/type/Bool'>Bool</a>;
<a href='/constructor/channelFull'>channelFull</a>#f0e6672a flags:<a href='/type/%23'>#</a> can_view_participants:flags.3?<a href='/constructor/true'>true</a> can_set_username:flags.6?<a href='/constructor/true'>true</a> can_set_stickers:flags.7?<a href='/constructor/true'>true</a> hidden_prehistory:flags.10?<a href='/constructor/true'>true</a> can_set_location:flags.16?<a href='/constructor/true'>true</a> has_scheduled:flags.19?<a href='/constructor/true'>true</a> can_view_stats:flags.20?<a href='/constructor/true'>true</a> blocked:flags.22?<a href='/constructor/true'>true</a> id:<a href='/type/int'>int</a> about:<a href='/type/string'>string</a> participants_count:flags.0?<a href='/type/int'>int</a> admins_count:flags.1?<a href='/type/int'>int</a> kicked_count:flags.2?<a href='/type/int'>int</a> banned_count:flags.2?<a href='/type/int'>int</a> online_count:flags.13?<a href='/type/int'>int</a> read_inbox_max_id:<a href='/type/int'>int</a> read_outbox_max_id:<a href='/type/int'>int</a> unread_count:<a href='/type/int'>int</a> chat_photo:<a href='/type/Photo'>Photo</a> notify_settings:<a href='/type/PeerNotifySettings'>PeerNotifySettings</a> exported_invite:<a href='/type/ExportedChatInvite'>ExportedChatInvite</a> bot_info:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/BotInfo'>BotInfo</a>&gt; migrated_from_chat_id:flags.4?<a href='/type/int'>int</a> migrated_from_max_id:flags.4?<a href='/type/int'>int</a> pinned_msg_id:flags.5?<a href='/type/int'>int</a> stickerset:flags.8?<a href='/type/StickerSet'>StickerSet</a> available_min_id:flags.9?<a href='/type/int'>int</a> folder_id:flags.11?<a href='/type/int'>int</a> linked_chat_id:flags.14?<a href='/type/int'>int</a> location:flags.15?<a href='/type/ChannelLocation'>ChannelLocation</a> slowmode_seconds:flags.17?<a href='/type/int'>int</a> slowmode_next_send_date:flags.18?<a href='/type/int'>int</a> stats_dc:flags.12?<a href='/type/int'>int</a> pts:<a href='/type/int'>int</a> = <a href='/type/ChatFull'>ChatFull</a>;
<a href='/constructor/messages.chats'>messages.chats</a>#64ff9fd5 chats:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/Chat'>Chat</a>&gt; = <a href='/type/messages.Chats'>messages.Chats</a>;
---functions---
<a href='/method/channels.setDiscussionGroup'>channels.setDiscussionGroup</a>#40582bb2 broadcast:<a href='/type/InputChannel'>InputChannel</a> group:<a href='/type/InputChannel'>InputChannel</a> = <a href='/type/Bool'>Bool</a>;
<a href='/method/channels.getGroupsForDiscussion'>channels.getGroupsForDiscussion</a>#f5dad378 = <a href='/type/messages.Chats'>messages.Chats</a>;</code></pre>
<p>A discussion group can be associated to a channel using <a href="/method/channels.setDiscussionGroup">channels.setDiscussionGroup</a>.<br>
The discussion group can be accessed in the client by clicking on the discuss button of the channel, or by accessing the <a href="/api/threads">comment section</a> of a specific post; the discussion group ID is also present in the <code>linked_chat_id</code> field of the <a href="/constructor/channelFull">channelFull</a> constructor. </p>
<p>All messages sent to the channel will also be sent to the linked group (with sender peer <code>from_id</code> equal to the peer of the linked channel); those messages will also be automatically <a href="/api/pin">pinned</a> in the group.</p>
<h3><a class="anchor" href="#linking-a-discussion-group" id="linking-a-discussion-group" name="linking-a-discussion-group"><i class="anchor-icon"></i></a>Linking a discussion group</h3>
<p>To obtain a list of admined supergroups that a channel admin can possibly associate to a channel, use <a href="/method/channels.getGroupsForDiscussion">channels.getGroupsForDiscussion</a>.<br>
Returned <a href="/api/channel">legacy group chats</a> must be first <a href="/api/channel#migration">upgraded to supergroups</a> before they can be set as a discussion group.<br>
Before linking a supergroup to a channel, access to the supergroup's old messages must also be enabled using <a href="/method/channels.togglePreHistoryHidden">channels.togglePreHistoryHidden</a>. </p>
<p>To set a returned supergroup as a discussion group use <a href="/method/channels.setDiscussionGroup">channels.setDiscussionGroup</a>.</p>
<p>Schema: </p>
<pre><code><a href='/constructor/boolFalse'>boolFalse</a>#bc799737 = <a href='/type/Bool'>Bool</a>;
<a href='/constructor/boolTrue'>boolTrue</a>#997275b5 = <a href='/type/Bool'>Bool</a>;
<a href='/constructor/messages.chats'>messages.chats</a>#64ff9fd5 chats:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/Chat'>Chat</a>&gt; = <a href='/type/messages.Chats'>messages.Chats</a>;
---functions---
<a href='/method/channels.setDiscussionGroup'>channels.setDiscussionGroup</a>#40582bb2 broadcast:<a href='/type/InputChannel'>InputChannel</a> group:<a href='/type/InputChannel'>InputChannel</a> = <a href='/type/Bool'>Bool</a>;
<a href='/method/channels.getGroupsForDiscussion'>channels.getGroupsForDiscussion</a>#f5dad378 = <a href='/type/messages.Chats'>messages.Chats</a>;
<a href='/method/channels.togglePreHistoryHidden'>channels.togglePreHistoryHidden</a>#eabbb94c channel:<a href='/type/InputChannel'>InputChannel</a> enabled:<a href='/type/Bool'>Bool</a> = <a href='/type/Updates'>Updates</a>;</code></pre></div>
</div>
</div>
</div>
<div class="footer_wrap">
<div class="footer_columns_wrap footer_desktop">
<div class="footer_column footer_column_telegram">
<h5>Telegram</h5>
<div class="footer_telegram_description"></div>
Telegram is a cloud-based mobile and desktop messaging app with a focus on security and speed.
</div>
<div class="footer_column">
<h5><a href="//telegram.org/faq">About</a></h5>
<ul>
<li><a href="//telegram.org/faq">FAQ</a></li>
<li><a href="//telegram.org/blog">Blog</a></li>
<li><a href="//telegram.org/jobs">Jobs</a></li>
</ul>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps#mobile-apps">Mobile Apps</a></h5>
<ul>
<li><a href="//telegram.org/dl/ios">iPhone/iPad</a></li>
<li><a href="//telegram.org/dl/android">Android</a></li>
<li><a href="//telegram.org/dl/wp">Windows Phone</a></li>
</ul>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps#desktop-apps">Desktop Apps</a></h5>
<ul>
<li><a href="//desktop.telegram.org/">PC/Mac/Linux</a></li>
<li><a href="//macos.telegram.org/">macOS</a></li>
<li><a href="//telegram.org/dl/web">Web-browser</a></li>
</ul>
</div>
<div class="footer_column footer_column_platform">
<h5><a href="/">Platform</a></h5>
<ul>
<li><a href="/api">API</a></li>
<li><a href="//translations.telegram.org/">Translations</a></li>
<li><a href="//instantview.telegram.org/">Instant View</a></li>
</ul>
</div>
</div>
<div class="footer_columns_wrap footer_mobile">
<div class="footer_column">
<h5><a href="//telegram.org/faq">About</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/blog">Blog</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps">Apps</a></h5>
</div>
<div class="footer_column">
<h5><a href="/">Platform</a></h5>
</div>
<div class="footer_column">
<h5><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)">Twitter</a></h5>
</div>
</div>
</div>
</div>
<script src="/js/main.js?42"></script>
<script src="/js/jquery.min.js?1"></script>
<script src="/js/bootstrap.min.js"></script>
<script>window.initDevPageNav&&initDevPageNav();
backToTopInit("Go up");
removePreloadInit();
</script>
</body>
</html>
<!-- page generated in 23.79ms -->

View file

@ -0,0 +1,131 @@
<!DOCTYPE html>
<html class="">
<head>
<meta charset="utf-8">
<title>Message drafts</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="How to handle message drafts">
<meta property="og:title" content="Message drafts">
<meta property="og:image" content="89f7ae8e51fc1ce19f">
<meta property="og:description" content="How to handle message drafts">
<link rel="shortcut icon" href="/favicon.ico?4" type="image/x-icon" />
<link href="/css/bootstrap.min.css?3" rel="stylesheet">
<link href="/css/telegram.css?212" rel="stylesheet" media="screen">
<style>
</style>
</head>
<body class="preload">
<div class="dev_page_wrap">
<div class="dev_page_head navbar navbar-static-top navbar-tg">
<div class="navbar-inner">
<div class="container clearfix">
<ul class="nav navbar-nav navbar-right hidden-xs"><li class="navbar-twitter"><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)"><i class="icon icon-twitter"></i><span> Twitter</span></a></li></ul>
<ul class="nav navbar-nav">
<li><a href="//telegram.org/">Home</a></li>
<li class="hidden-xs"><a href="//telegram.org/faq">FAQ</a></li>
<li class="hidden-xs"><a href="//telegram.org/apps">Apps</a></li>
<li class="active"><a href="/api">API</a></li>
<li class=""><a href="/mtproto">Protocol</a></li>
<li class=""><a href="/schema">Schema</a></li>
</ul>
</div>
</div>
</div>
<div class="container clearfix">
<div class="dev_page">
<div id="dev_page_content_wrap" class=" ">
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/api/drafts" >Message drafts</a></li></ul></div>
<h1 id="dev_page_title">Message drafts</h1>
<div id="dev_page_content"><!-- scroll_nav -->
<p>Message <a href="https://telegram.org/blog/drafts">drafts</a> in Telegram allow syncing the text typed into message fields between devices.</p>
<h3><a class="anchor" href="#drafts" id="drafts" name="drafts"><i class="anchor-icon"></i></a>Drafts</h3>
<p>Drafts are represented by the <a href="/type/DraftMessage">DraftMessage</a> constructors.
The parameters of the peer-specific draft should be used as defaults when composing a message to be sent to a certain peer (in the case of media, the same draft should still be used as base, the message will become the caption).
If the user exits the app before sending the message, the message should be saved as a draft:</p>
<h3><a class="anchor" href="#saving-drafts" id="saving-drafts" name="saving-drafts"><i class="anchor-icon"></i></a>Saving drafts</h3>
<p>Drafts can be saved using the <a href="/method/messages.saveDraft">messages.saveDraft</a> method.</p>
<h3><a class="anchor" href="#downloading-drafts" id="downloading-drafts" name="downloading-drafts"><i class="anchor-icon"></i></a>Downloading drafts</h3>
<p>New drafts are automatically sent to all devices via <a href="/constructor/updateDraftMessage">updateDraftMessage</a> updates.</p>
<p><a href="/constructor/dialog">Dialog</a> objects fetched via the API also contain the draft associated with the dialog.</p>
<h3><a class="anchor" href="#clearing-drafts" id="clearing-drafts" name="clearing-drafts"><i class="anchor-icon"></i></a>Clearing drafts</h3>
<p>Drafts can be cleared by setting the <code>clear_draft</code> flag when sending messages or media using <a href="/method/messages.sendMessage">messages.sendMessage</a>, <a href="/method/messages.sendMedia">messages.sendMedia</a>, <a href="/method/messages.sendMultiMedia">messages.sendMultiMedia</a>, <a href="/method/messages.sendInlineBotResult">messages.sendInlineBotResult</a> and similar or manually by passing empty values to <a href="/method/messages.saveDraft">messages.saveDraft</a>.</p></div>
</div>
</div>
</div>
<div class="footer_wrap">
<div class="footer_columns_wrap footer_desktop">
<div class="footer_column footer_column_telegram">
<h5>Telegram</h5>
<div class="footer_telegram_description"></div>
Telegram is a cloud-based mobile and desktop messaging app with a focus on security and speed.
</div>
<div class="footer_column">
<h5><a href="//telegram.org/faq">About</a></h5>
<ul>
<li><a href="//telegram.org/faq">FAQ</a></li>
<li><a href="//telegram.org/blog">Blog</a></li>
<li><a href="//telegram.org/jobs">Jobs</a></li>
</ul>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps#mobile-apps">Mobile Apps</a></h5>
<ul>
<li><a href="//telegram.org/dl/ios">iPhone/iPad</a></li>
<li><a href="//telegram.org/dl/android">Android</a></li>
<li><a href="//telegram.org/dl/wp">Windows Phone</a></li>
</ul>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps#desktop-apps">Desktop Apps</a></h5>
<ul>
<li><a href="//desktop.telegram.org/">PC/Mac/Linux</a></li>
<li><a href="//macos.telegram.org/">macOS</a></li>
<li><a href="//telegram.org/dl/web">Web-browser</a></li>
</ul>
</div>
<div class="footer_column footer_column_platform">
<h5><a href="/">Platform</a></h5>
<ul>
<li><a href="/api">API</a></li>
<li><a href="//translations.telegram.org/">Translations</a></li>
<li><a href="//instantview.telegram.org/">Instant View</a></li>
</ul>
</div>
</div>
<div class="footer_columns_wrap footer_mobile">
<div class="footer_column">
<h5><a href="//telegram.org/faq">About</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/blog">Blog</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps">Apps</a></h5>
</div>
<div class="footer_column">
<h5><a href="/">Platform</a></h5>
</div>
<div class="footer_column">
<h5><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)">Twitter</a></h5>
</div>
</div>
</div>
</div>
<script src="/js/main.js?42"></script>
<script src="/js/jquery.min.js?1"></script>
<script src="/js/bootstrap.min.js"></script>
<script>window.initDevPageNav&&initDevPageNav();
backToTopInit("Go up");
removePreloadInit();
</script>
</body>
</html>
<!-- page generated in 16.3ms -->

View file

@ -0,0 +1,244 @@
<!DOCTYPE html>
<html class="">
<head>
<meta charset="utf-8">
<title>End-to-End Encryption, Secret Chats</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="New feature for end-to-end-encrypted messaging.">
<meta property="og:title" content="End-to-End Encryption, Secret Chats">
<meta property="og:image" content="842181036bcb572cf0">
<meta property="og:description" content="New feature for end-to-end-encrypted messaging.">
<link rel="shortcut icon" href="/favicon.ico?4" type="image/x-icon" />
<link href="/css/bootstrap.min.css?3" rel="stylesheet">
<link href="/css/telegram.css?212" rel="stylesheet" media="screen">
<style>
</style>
</head>
<body class="preload">
<div class="dev_page_wrap">
<div class="dev_page_head navbar navbar-static-top navbar-tg">
<div class="navbar-inner">
<div class="container clearfix">
<ul class="nav navbar-nav navbar-right hidden-xs"><li class="navbar-twitter"><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)"><i class="icon icon-twitter"></i><span> Twitter</span></a></li></ul>
<ul class="nav navbar-nav">
<li><a href="//telegram.org/">Home</a></li>
<li class="hidden-xs"><a href="//telegram.org/faq">FAQ</a></li>
<li class="hidden-xs"><a href="//telegram.org/apps">Apps</a></li>
<li class="active"><a href="/api">API</a></li>
<li class=""><a href="/mtproto">Protocol</a></li>
<li class=""><a href="/schema">Schema</a></li>
</ul>
</div>
</div>
</div>
<div class="container clearfix">
<div class="dev_page">
<div id="dev_page_content_wrap" class=" ">
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/api/end-to-end" >End-to-End Encryption, Secret Chats</a></li></ul></div>
<h1 id="dev_page_title">End-to-End Encryption, Secret Chats</h1>
<div id="dev_page_content"><!-- scroll_nav -->
<blockquote>
<p>This article on MTProto's End-to-End encryption is meant for <strong>advanced users</strong>.
If you want to learn more about <a href="https://telegram.org/faq#secret-chats">Secret Chats</a> from a less intimidating source, kindly see our <a href="https://telegram.org/faq#secret-chats">general FAQ</a>.</p>
</blockquote>
<blockquote>
<p>Note that as of version 4.6, major Telegram clients are using <strong>MTProto 2.0</strong>.
MTProto v.1.0 is deprecated and is currently being phased out.</p>
</blockquote>
<hr>
<h5><a class="anchor" href="#related-articles" id="related-articles" name="related-articles"><i class="anchor-icon"></i></a>Related articles</h5>
<p><div class="dev_page_nav_wrap"></p>
<ul>
<li><a href="/mtproto/security_guidelines">Security guidelines for developers</a></li>
<li><a href="/api/end-to-end/pfs">Perfect Forward Secrecy in Secret Chats</a></li>
<li><a href="/api/end-to-end/seq_no">Sequence numbers in Secret Chats</a></li>
<li><a href="/schema/end-to-end">End-to-End TL Schema</a></li>
</ul>
<p></div></p>
<hr>
<p>Secret Chats are one-on-one chats wherein messages are encrypted with a key held only by the chats participants. Note that the <a href="/schema/end-to-end">schema</a> for these end-to-end encrypted Secret Chats is different from what is used for <a href="/mtproto">cloud chats</a>:</p>
<div>
<a href="/file/811140633/4/hHw6Zy2DPyQ.109500/cabc10049a7190694f" target="_blank"><img src="/file/811140633/4/hHw6Zy2DPyQ.109500/cabc10049a7190694f" title="End-to-end encryption in MTProto 2.0 (Secret Chats)" class="dev_page_image" style="max-width: 600px"></a>
</div>
<h4><a class="anchor" href="#a-note-on-mtproto-20" id="a-note-on-mtproto-20" name="a-note-on-mtproto-20"><i class="anchor-icon"></i></a>A note on MTProto 2.0</h4>
<p>This article describes the end-to-end encryption layer in the MTProto protocol version <strong>2.0</strong>.
The principal differences from version 1.0 (<a href="/api/end-to-end_v1">described here</a> for reference) are as follows:</p>
<ul>
<li>SHA-256 is used instead of SHA-1;</li>
<li>Padding bytes are involved in the computation of msg_key;</li>
<li>msg_key depends not only on the message to be encrypted, but on a portion of the secret chat key as well;</li>
<li>12..1024 padding bytes are used instead of 0..15 padding bytes in v.1.0.</li>
</ul>
<p>See also: <a href="https://core.telegram.org/mtproto">MTProto 2.0: Cloud Chats, server-client encryption</a></p>
<h3><a class="anchor" href="#key-generation" id="key-generation" name="key-generation"><i class="anchor-icon"></i></a>Key Generation</h3>
<p>Keys are generated using the <a href="https://en.wikipedia.org/wiki/Diffie%E2%80%93Hellman_key_exchange">Diffie-Hellman protocol</a>.</p>
<p>Let us consider the following scenario: User <strong>A</strong> would like to initiate end-to-end encrypted communication with User <strong>B</strong>.</p>
<h4><a class="anchor" href="#sending-a-request" id="sending-a-request" name="sending-a-request"><i class="anchor-icon"></i></a>Sending a Request</h4>
<p>User <strong>A</strong> executes <a href="/method/messages.getDhConfig">messages.getDhConfig</a> to obtain the Diffie-Hellman parameters: a prime <strong>p</strong>, and a high order element <strong>g</strong>.</p>
<p>Executing this method before each new key generation procedure is of vital importance. It makes sense to cache the values of the parameters together with the version in order to avoid having to receive all of the values every time. If the version stored on the client is still up-to-date, the server will return the constructor <a href="/constructor/messages.dhConfigNotModified">messages.dhConfigNotModified</a>.</p>
<p>Client is expected to check whether <strong>p</strong> is a safe 2048-bit prime (meaning that both <strong>p</strong> and <strong>(p-1)/2</strong> are prime, and that 2^2047 &lt; p &lt; 2^2048), and that <strong>g</strong> generates a cyclic subgroup of prime order <strong>(p-1)/2</strong>, i.e. is a quadratic residue <strong>mod p</strong>. Since <strong>g</strong> is always equal to 2, 3, 4, 5, 6 or 7, this is easily done using quadratic reciprocity law, yielding a simple condition on <strong>p mod 4g</strong> -- namely, <strong>p mod 8 = 7</strong> for <strong>g = 2</strong>; <strong>p mod 3 = 2</strong> for <strong>g = 3</strong>; no extra condition for <strong>g = 4</strong>; <strong>p mod 5 = 1 or 4</strong> for <strong>g = 5</strong>; <strong>p mod 24 = 19 or 23</strong> for <strong>g = 6</strong>; and <strong>p mod 7 = 3, 5 or 6</strong> for <strong>g = 7</strong>. After <strong>g</strong> and <strong>p</strong> have been checked by the client, it makes sense to cache the result, so as to avoid repeating lengthy computations in future. This cache might be shared with one used for <a href="/mtproto/auth_key">Authorization Key generation</a>.</p>
<p>If the client has an inadequate random number generator, it makes sense to pass the <strong>random_length</strong> parameter (random_length&gt; 0) so the server generates its own random sequence <strong>random</strong> of the appropriate length.
<strong>Important</strong>: using the servers random sequence in its raw form may be unsafe. It must be combined with a client sequence, for example, by generating a client random number of the same length (<strong>client_random</strong>) and using <code>final_random := random XOR client_random</code>.</p>
<p>Client <strong>A</strong> computes a 2048-bit number <strong>a</strong> (using sufficient entropy or the servers <strong>random</strong>; see above) and executes <a href="/method/messages.requestEncryption">messages.requestEncryption</a> after passing in <code>g_a := pow(g, a) mod dh_prime</code>.</p>
<p>User <strong>B</strong> receives the update <a href="/constructor/updateEncryption">updateEncryption</a> for all associated authorization keys (all authorized devices) with the chat constructor <a href="/constructor/encryptedChatRequested">encryptedChatRequested</a>. The user must be shown basic information about User <strong>A</strong> and must be prompted to accept or reject the request.</p>
<p>Both clients are to check that <strong>g</strong>, <strong>g_a</strong> and <strong>g_b</strong> are greater than one and smaller than <strong>p-1</strong>. We recommend checking that <strong>g_a</strong> and <strong>g_b</strong> are between <strong>2^{2048-64}</strong> and <strong>p - 2^{2048-64}</strong> as well.</p>
<h4><a class="anchor" href="#accepting-a-request" id="accepting-a-request" name="accepting-a-request"><i class="anchor-icon"></i></a>Accepting a Request</h4>
<p>After User <strong>B</strong> confirms the creation of a secret chat with <strong>A</strong> in the client interface, Client <strong>B</strong> also receives up-to-date configuration parameters for the Diffie-Hellman method. Thereafter, it generates a random 2048-bit number, <strong>b</strong>, using rules similar to those for <strong>a</strong>. </p>
<p>Having received <strong>g_a</strong> from the update with <a href="/constructor/encryptedChatRequested">encryptedChatRequested</a>, it can immediately generate the final shared key: <code>key = (pow(g_a, b) mod dh_prime)</code>. If key length &lt; 256 bytes, add several leading zero bytes as padding — so that the key is exactly 256 bytes long. Its fingerprint, <strong>key_fingerprint</strong>, is equal to the 64 last bits of SHA1 (key). </p>
<p><strong>Note 1:</strong> in this particular case SHA1 is used here even for MTProto 2.0 secret chats. </p>
<p><strong>Note 2:</strong> this fingerprint is used as a sanity check for the key exchange procedure to detect bugs when developing client software — it is not connected to the key visualization used on the clients as means of external authentication in secret chats. <a href="/api/end-to-end/pfs#key-visualization">Key visualizations</a> on the clients are generated using the first 128 bits of SHA1(intial key) followed by the first 160 bits of SHA256(key used when secret chat was updated to layer 46).</p>
<p>Client <strong>B</strong> executes <a href="/method/messages.acceptEncryption">messages.acceptEncryption</a> after passing it <code>g_b := pow(g, b) mod dh_prime</code> and <strong>key_fingerprint</strong>.</p>
<p>For all of Client <strong>Bs</strong> authorized devices, except the current one, <a href="/constructor/updateEncryption">updateEncryption</a> updates are sent with the constructor <a href="/constructor/encryptedChatDiscarded">encryptedChatDiscarded</a>. Thereafter, the only device that will be able to access the secret chat is Device <strong>B</strong>, which made the call to <a href="/method/messages.acceptEncryption">messages.acceptEncryption</a>.</p>
<p>User <strong>A</strong> will be sent an <a href="/constructor/updateEncryption">updateEncryption</a> update with the constructor <a href="/constructor/encryptedChat">encryptedChat</a>, for the authorization key that initiated the chat.</p>
<p>With <strong>g_b</strong> from the update, Client <strong>A</strong> can also compute the shared key <code>key = (pow(g_b, a) mod dh_prime)</code>. If key length &lt; 256 bytes, add several leading zero bytes as padding — so that the key is exactly 256 bytes long. If the fingerprint for the received key is identical to the one that was passed to <a href="/constructor/encryptedChat">encryptedChat</a>, incoming messages can be sent and processed. Otherwise, <a href="/method/messages.discardEncryption">messages.discardEncryption</a> must be executed and the user notified.</p>
<h4><a class="anchor" href="#perfect-forward-secrecy" id="perfect-forward-secrecy" name="perfect-forward-secrecy"><i class="anchor-icon"></i></a>Perfect Forward Secrecy</h4>
<p>In order to keep past communications safe, official Telegram clients will initiate re-keying once a key has been used to decrypt and encrypt more than 100 messages, or has been in use for more than one week, provided the key has been used to encrypt at least one message. Old keys are then securely discarded and cannot be reconstructed, even with access to the new keys currently in use.</p>
<blockquote>
<p>The re-keying protocol is further described in this article: <a href="/api/end-to-end/pfs">Perfect Forward Secrecy in Secret Chats</a>.</p>
</blockquote>
<p>Please note that your client must support Forward Secrecy in Secret Chats to be compatible with official Telegram clients. </p>
<h3><a class="anchor" href="#sending-and-receiving-messages-in-a-secret-chat" id="sending-and-receiving-messages-in-a-secret-chat" name="sending-and-receiving-messages-in-a-secret-chat"><i class="anchor-icon"></i></a>Sending and Receiving Messages in a Secret Chat</h3>
<h4><a class="anchor" href="#serialization-and-encryption-of-outgoing-messages" id="serialization-and-encryption-of-outgoing-messages" name="serialization-and-encryption-of-outgoing-messages"><i class="anchor-icon"></i></a>Serialization and Encryption of Outgoing Messages</h4>
<p>A TL object of type <a href="/type/DecryptedMessage">DecryptedMessage</a> is created and contains the message in plain text. For backward compatibility, the object must be wrapped in the constructor <a href="/constructor/decryptedMessageLayer">decryptedMessageLayer</a> with an indication of the supported layer (starting with 46).</p>
<blockquote>
<p>The TL-Schema for the contents of end-to-end encrypted messages is available <a href="/schema/end-to-end">here »</a></p>
</blockquote>
<p>The resulting construct is serialized as an array of bytes using generic TL rules. The resulting array is prepended by 4 bytes containing the array length not counting these 4 bytes. </p>
<p>The byte array is padded with 12 to 1024 random padding bytes to make its length divisible by 16 bytes. (In the older MTProto 1.0 encryption, only 0 to 15 padding bytes were used.)</p>
<p>Message key, <strong>msg_key</strong>, is computed as the 128 middle bits of the SHA256 of the data obtained in the previous step, prepended by 32 bytes from the shared key <strong>key</strong>. (For the older MTProto 1.0 encryption, <strong>msg_key</strong> was computed differently, as the 128 lower bits of SHA1 of the data obtained in the previous steps, <em>excluding the padding bytes</em>.)</p>
<p>For MTProto 2.0, the AES key <strong>aes_key</strong> and initialization vector <strong>aes_iv</strong> are computed ( <strong>key</strong> is the shared key obtained during <a href="#key-generation">Key Generation</a> ) as follows:</p>
<ul>
<li>msg_key_large = SHA256 (substr (key, 88+x, 32) + plaintext + random_padding);</li>
<li>msg_key = substr (msg_key_large, 8, 16);</li>
<li>sha256_a = SHA256 (msg_key + substr (key, x, 36));</li>
<li>sha256_b = SHA256 (substr (key, 40+x, 36) + msg_key);</li>
<li>aes_key = substr (sha256_a, 0, 8) + substr (sha256_b, 8, 16) + substr (sha256_a, 24, 8);</li>
<li>aes_iv = substr (sha256_b, 0, 8) + substr (sha256_a, 8, 16) + substr (sha256_b, 24, 8);</li>
</ul>
<p>For MTProto 2.0, <strong>x=0</strong> for messages from the originator of the secret chat, <strong>x=8</strong> for the messages in the opposite direction.</p>
<p><em>For the obsolete MTProto 1.0, msg_key, aes_key, and aes_iv were computed differently (see <a href="/api/end-to-end_v1#serialization-and-encryption-of-outgoing-messages">this document</a> for reference).</em></p>
<p>Data is encrypted with a 256-bit key, <strong>aes_key</strong>, and a 256-bit initialization vector, <strong>aes-iv</strong>, using AES-256 encryption with infinite garble extension (IGE). Encryption key fingerprint <strong>key_fingerprint</strong> and the message key <strong>msg_key</strong> are added at the top of the resulting byte array.</p>
<p>Encrypted data is embedded into a <a href="/method/messages.sendEncrypted">messages.sendEncrypted</a> API call and passed to Telegram server for delivery to the other party of the Secret Chat.</p>
<h4><a class="anchor" href="#upgrading-to-mtproto-20-from-mtproto-10" id="upgrading-to-mtproto-20-from-mtproto-10" name="upgrading-to-mtproto-20-from-mtproto-10"><i class="anchor-icon"></i></a>Upgrading to MTProto 2.0 from MTProto 1.0</h4>
<p>As soon as both parties in a secret chat are using at least Layer 73, they should only use MTProto 2.0 for all outgoing messages. Some of the first received messages may use MTProto 1.0, if a sufficiently high starting layer has not been negotiated during the creation of the secret chat. After the first message encrypted with MTProto 2.0 (or the first message with Layer 73 or higher) is received, all messages with higher <a href="#sequence-numbers">sequence numbers</a> must be encrypted with MTProto 2.0 as well.</p>
<p>As long as the current layer is lower than 73, each party should try to decrypt received messages with MTProto 1.0, and if this is not successfull (msg_key does not match), try MTProto 2.0. Once the first MTProto 2.0-encrypted message arrives (or the layer is upgraded to 73), there is no need to try MTProto 1.0 decryption for any of the further messages (unless the client is still waiting for some gaps to be closed).</p>
<h4><a class="anchor" href="#decrypting-an-incoming-message" id="decrypting-an-incoming-message" name="decrypting-an-incoming-message"><i class="anchor-icon"></i></a>Decrypting an Incoming Message</h4>
<p>The steps above are performed in reverse order.
When an encrypted message is received, you <strong>must</strong> check that msg_key is <strong>in fact</strong> equal to the 128 middle bits of the SHA256 hash of the decrypted message, prepended by 32 bytes taken from the shared <strong>key</strong>.
If the message layer is greater than the one supported by the client, the user must be notified that the client version is out of date and prompted to update.</p>
<h4><a class="anchor" href="#sequence-numbers" id="sequence-numbers" name="sequence-numbers"><i class="anchor-icon"></i></a>Sequence numbers</h4>
<p>It is necessary to interpret all messages in their original order to protect against possible manipulations. Secret chats support a special mechanism for handling seq_no counters independently from the server.</p>
<blockquote>
<p>Proper handling of these counters is further described in this article: <a href="/api/end-to-end/seq_no">Sequence numbers in Secret Chats</a>.</p>
</blockquote>
<p>Please note that your client must support sequence numbers in Secret Chats to be compatible with official Telegram clients. </p>
<h4><a class="anchor" href="#sending-encrypted-files" id="sending-encrypted-files" name="sending-encrypted-files"><i class="anchor-icon"></i></a>Sending Encrypted Files</h4>
<p>All files sent to secret chats are encrypted with one-time keys that are in no way related to the chats shared key. Before an encrypted file is sent, it is assumed that the encrypted files address will be attached to the outside of an encrypted message using the <strong>file</strong> parameter of the <a href="/method/messages.sendEncryptedFile">messages.sendEncryptedFile</a> method and that the key for direct decryption will be sent in the body of the message (the <strong>key</strong> parameter in the constructors <a href="/constructor/decryptedMessageMediaPhoto">decryptedMessageMediaPhoto</a>, <a href="/constructor/decryptedMessageMediaPhoto">decryptedMessageMediaVideo</a> and <a href="/constructor/decryptedMessageMediaPhoto">decryptedMessageMediaFile</a>.</p>
<p>Prior to a file being sent to a secret chat, 2 random 256-bit numbers are computed which will serve as the AES key and initialization vector used to encrypt the file. AES-256 encryption with infinite garble extension (IGE) is used in like manner.</p>
<p>The key fingerprint is computed as follows:</p>
<ul>
<li>digest = md5(key + iv)</li>
<li>fingerprint = substr(digest, 0, 4) XOR substr(digest, 4, 4)</li>
</ul>
<p>The encrypted contents of a file are stored on the server in much the same way as those of a <a href="/api/files">file in cloud chats</a>: piece by piece using calls to <a href="/method/upload.saveFilePart">upload.saveFilePart</a>.
A subsequent call to <a href="/method/messages.sendEncryptedFile">messages.sendEncryptedFile</a> will assign an identifier to the stored file and send the address together with the message. The recipient will receive an update with <a href="/constructor/encryptedMessage">encryptedMessage</a>, and the <strong>file</strong> parameter will contain file information.</p>
<p>Incoming and outgoing encrypted files can be forwarded to other secret chats using the constructor <a href="/constructor/inputEncryptedFile">inputEncryptedFile</a> to avoid saving the same content on the server twice.</p>
<h4><a class="anchor" href="#working-with-an-update-box" id="working-with-an-update-box" name="working-with-an-update-box"><i class="anchor-icon"></i></a>Working with an Update Box</h4>
<p>Secret chats are associated with specific devices (or rather with <a href="/mtproto/description#creating-an-authorization-key">authorization keys</a>), not users. A conventional message box, which uses <strong>pts</strong> to describe the clients status, is not suitable, because it is designed for long-term message storage and message access from different devices.</p>
<p>An additional temporary message queue is introduced as a solution to this problem. When an update regarding a message from a secret chat is sent, a new value of <strong>qts</strong> is sent, which helps reconstruct the difference if there has been a long break in the connection or in case of loss of an update.</p>
<p>As the number of events increases, the value of <strong>qts</strong> increases by 1 with each new event. The initial value may not (and will not) be equal to 0.</p>
<p>The fact that events from the temporary queue have been received and stored by the client is acknowledged explicitly by a call to the <a href="/method/messages.receivedQueue">messages.receivedQueue</a> method or implicitly by a call to <a href="/method/updates.getDifference">updates.getDifference</a> (the value of <strong>qts</strong> passed, not the final state). All messages acknowledged as delivered by the client, as well as any messages older than 7 days, may (and will) be deleted from the server.</p>
<p>Upon de-authorization, the event queue of the corresponding device will be forcibly cleared, and the value of <strong>qts</strong> will become irrelevant.</p>
<h2><a class="anchor" href="#updating-to-new-layers" id="updating-to-new-layers" name="updating-to-new-layers"><i class="anchor-icon"></i></a>Updating to new layers</h2>
<p>Your client should always store the maximal layer that is known to be supported by the client on the other side of a secret chat. When the secret chat is first created, this value should be initialized to 46. This remote layer value must always be updated immediately after receiving <em>any</em> packet containing information of an upper layer, i.e.:</p>
<ul>
<li>any secret chat message containing <em>layer_no</em> in its <code>decryptedMessageLayer</code> with <em>layer</em>&gt;=46, or</li>
<li>a <a href="/constructor/decryptedMessageActionNotifyLayer">decryptedMessageActionNotifyLayer</a> service message, wrapped as if it were the <a href="/constructor/decryptedMessageService">decryptedMessageService</a> constructor of the obsolete layer 8 (constructor <code>decryptedMessageService#aa48327d</code>).</li>
</ul>
<h4><a class="anchor" href="#notifying-the-remote-client-about-your-local-layer" id="notifying-the-remote-client-about-your-local-layer" name="notifying-the-remote-client-about-your-local-layer"><i class="anchor-icon"></i></a>Notifying the remote client about your local layer</h4>
<p>In order to notify the remote client of your local layer, your client must send a message of the <code>decryptedMessageActionNotifyLayer</code> type. This notification must be wrapped in a constructor of an appropriate layer.</p>
<p>There are two cases when your client must notify the remote client about its local layer:</p>
<ol>
<li>As soon as a new secret chat has been created, immediately after the secret key has been successfully exchanged.</li>
<li>Immediately after the local client has been updated to support a new secret chat layer. In this case notifications must be sent to <strong>all</strong> currently existing secret chats. Note that this is only necessary when updating to new layers that contain changes in the secret chats implementation (e.g. you dont need to do this when your client is updated from Layer 46 to Layer 47).</li>
</ol></div>
</div>
</div>
</div>
<div class="footer_wrap">
<div class="footer_columns_wrap footer_desktop">
<div class="footer_column footer_column_telegram">
<h5>Telegram</h5>
<div class="footer_telegram_description"></div>
Telegram is a cloud-based mobile and desktop messaging app with a focus on security and speed.
</div>
<div class="footer_column">
<h5><a href="//telegram.org/faq">About</a></h5>
<ul>
<li><a href="//telegram.org/faq">FAQ</a></li>
<li><a href="//telegram.org/blog">Blog</a></li>
<li><a href="//telegram.org/jobs">Jobs</a></li>
</ul>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps#mobile-apps">Mobile Apps</a></h5>
<ul>
<li><a href="//telegram.org/dl/ios">iPhone/iPad</a></li>
<li><a href="//telegram.org/dl/android">Android</a></li>
<li><a href="//telegram.org/dl/wp">Windows Phone</a></li>
</ul>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps#desktop-apps">Desktop Apps</a></h5>
<ul>
<li><a href="//desktop.telegram.org/">PC/Mac/Linux</a></li>
<li><a href="//macos.telegram.org/">macOS</a></li>
<li><a href="//telegram.org/dl/web">Web-browser</a></li>
</ul>
</div>
<div class="footer_column footer_column_platform">
<h5><a href="/">Platform</a></h5>
<ul>
<li><a href="/api">API</a></li>
<li><a href="//translations.telegram.org/">Translations</a></li>
<li><a href="//instantview.telegram.org/">Instant View</a></li>
</ul>
</div>
</div>
<div class="footer_columns_wrap footer_mobile">
<div class="footer_column">
<h5><a href="//telegram.org/faq">About</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/blog">Blog</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps">Apps</a></h5>
</div>
<div class="footer_column">
<h5><a href="/">Platform</a></h5>
</div>
<div class="footer_column">
<h5><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)">Twitter</a></h5>
</div>
</div>
</div>
</div>
<script src="/js/main.js?42"></script>
<script src="/js/jquery.min.js?1"></script>
<script src="/js/bootstrap.min.js"></script>
<script>window.initDevPageNav&&initDevPageNav();
backToTopInit("Go up");
removePreloadInit();
</script>
</body>
</html>
<!-- page generated in 25.76ms -->

View file

@ -0,0 +1,176 @@
<!DOCTYPE html>
<html class="">
<head>
<meta charset="utf-8">
<title>Perfect Forward Secrecy</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="Telegram supports Perfect Forward Secrecy (PFS) in Secret Chats as of Layer 20. See updating to new layers.
In order to…">
<meta property="og:title" content="Perfect Forward Secrecy">
<meta property="og:image" content="">
<meta property="og:description" content="Telegram supports Perfect Forward Secrecy (PFS) in Secret Chats as of Layer 20. See updating to new layers.
In order to…">
<link rel="shortcut icon" href="/favicon.ico?4" type="image/x-icon" />
<link href="/css/bootstrap.min.css?3" rel="stylesheet">
<link href="/css/telegram.css?212" rel="stylesheet" media="screen">
<style>
</style>
</head>
<body class="preload">
<div class="dev_page_wrap">
<div class="dev_page_head navbar navbar-static-top navbar-tg">
<div class="navbar-inner">
<div class="container clearfix">
<ul class="nav navbar-nav navbar-right hidden-xs"><li class="navbar-twitter"><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)"><i class="icon icon-twitter"></i><span> Twitter</span></a></li></ul>
<ul class="nav navbar-nav">
<li><a href="//telegram.org/">Home</a></li>
<li class="hidden-xs"><a href="//telegram.org/faq">FAQ</a></li>
<li class="hidden-xs"><a href="//telegram.org/apps">Apps</a></li>
<li class="active"><a href="/api">API</a></li>
<li class=""><a href="/mtproto">Protocol</a></li>
<li class=""><a href="/schema">Schema</a></li>
</ul>
</div>
</div>
</div>
<div class="container clearfix">
<div class="dev_page">
<div id="dev_page_content_wrap" class=" ">
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/api/end-to-end" >Secret Chats</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/api/end-to-end%2Fpfs" >Perfect Forward Secrecy</a></li></ul></div>
<h1 id="dev_page_title">Perfect Forward Secrecy</h1>
<div id="dev_page_content"><blockquote>
<p>Telegram supports Perfect Forward Secrecy (PFS) in Secret Chats as of Layer 20. See <a href="/api/end-to-end#updating-to-new-layers">updating to new layers</a>.</p>
</blockquote>
<p>In order to keep past communications safe, official Telegram clients will initiate re-keying once a key has been used to decrypt and encrypt more than 100 messages, or has been in use for more than one week, provided the key has been used to encrypt at least one message. Old keys are then securely discarded and cannot be reconstructed, even with access to the new keys currently in use.</p>
<p>Any client participating in a Secret Chat can initiate re-keying as soon as it perceives that the current key has been used for too long or for encrypting too many messages. Please note that you should never initiate a new instance of the re-keying protocol if an uncompleted instance exists, initiated by either party.</p>
<p><strong>Note:</strong> third-party developers are required to maintain the same level of security. All clients with secret chat support must be able to initiate re-keying and accept relevant service messages. See <a href="/mtproto/security_guidelines">Security Guidelines</a>.</p>
<h3><a class="anchor" href="#re-keying-protocol" id="re-keying-protocol" name="re-keying-protocol"><i class="anchor-icon"></i></a>Re-keying protocol</h3>
<p>New keys are generated by exchanging special messages, using previously established keys for encryption. The re-keying protocol between parties A and B normally consists of four steps:</p>
<h5><a class="anchor" href="#1-decryptedmessageactionrequestkey" id="1-decryptedmessageactionrequestkey" name="1-decryptedmessageactionrequestkey"><i class="anchor-icon"></i></a>1. decryptedMessageActionRequestKey</h5>
<p>A (re-keying initiator) generates a new value of <em>a</em>, subject to the same limitations as for the <a href="https://core.telegram.org/api/end-to-end#key-generation">initial Diffie-Hellman key exchange</a>, and sends the value of <em>pow(g,a)</em> to B, embedded in a <a href="/constructor/decryptedMessageService">decryptedMessageService</a>:</p>
<pre><code><a href='/constructor/decryptedMessageActionRequestKey'>decryptedMessageActionRequestKey</a> exchange_id:<a href='/type/long'>long</a> g_a:<a href='/type/string'>string</a> = <a href='/type/DecryptedMessageAction'>DecryptedMessageAction</a>;</code></pre>
<ul>
<li><em>exchange_id</em> is a random number identifying this instance of the Re-Keying Protocol for both parties</li>
<li><em>g_a</em> is the value of <em>pow(g,a) mod p</em></li>
</ul>
<p>Note that the same Diffie--Hellman parameters <em>(p,g)</em> as for the initial Diffie--Hellman key exchange in this secret chat are used. They do not need to be re-transmitted explicitly.</p>
<h5><a class="anchor" href="#2-decryptedmessageactionacceptkey" id="2-decryptedmessageactionacceptkey" name="2-decryptedmessageactionacceptkey"><i class="anchor-icon"></i></a>2. decryptedMessageActionAcceptKey</h5>
<p>Upon receipt of the above service message, B checks its content, and generates a response with same <em>exchange_id</em>, for a newly generated value of <em>b</em>:</p>
<pre><code><a href='/constructor/decryptedMessageActionAcceptKey'>decryptedMessageActionAcceptKey</a> exchange_id:<a href='/type/long'>long</a> g_b:<a href='/type/string'>string</a> key_fingerprint:<a href='/type/long'>long</a> = <a href='/type/DecryptedMessageAction'>DecryptedMessageAction</a>;</code></pre>
<ul>
<li><em>exchange_id</em> is the same as in the received <a href="/constructor/decryptedMessageActionRequestKey">decryptedMessageActionRequestKey</a></li>
<li><em>g_b</em> is the value of <em>pow(g,b) mod p</em></li>
<li><em>key_fingerprint</em> is the 64-bit fingerprint of the newly generated <em>key = pow(g_a, b) mod p</em>, used as a sanity check of the implementation</li>
</ul>
<p>At this stage, B can already compute the new key <em>key</em> = <em>pow(g_a, b) mod p</em> and its <em>key_fingerprint</em> (last 64 bits of its SHA-1). However, it continues using the previous key until the completion of the exchange.</p>
<p>Once side B sends <a href="/constructor/decryptedMessageActionAcceptKey">decryptedMessageActionAcceptKey</a>, it cannot abort the key exchange; it must be ready to switch to the new key immediately after a <code>decryptedMessageActionCommitKey</code> is received. Therefore, if side B wishes to delay the usage of new key, for example in order to fill some seq_no gaps first, it must delay the <code>decryptedMessageActionAcceptKey</code> answer accordingly.</p>
<h5><a class="anchor" href="#3-decryptedmessageactioncommitkey" id="3-decryptedmessageactioncommitkey" name="3-decryptedmessageactioncommitkey"><i class="anchor-icon"></i></a>3. decryptedMessageActionCommitKey</h5>
<p>Once A receives a valid <code>decryptedMessageActionAcceptKey</code>, it performs all necessary checks, and "commits" the new key by means of the following service message:</p>
<pre><code><a href='/constructor/decryptedMessageActionCommitKey'>decryptedMessageActionCommitKey</a> exchange_id:<a href='/type/long'>long</a> key_fingerprint:<a href='/type/long'>long</a> = <a href='/type/DecryptedMessageAction'>DecryptedMessageAction</a>;</code></pre>
<ul>
<li><em>exchange_id</em> is the same as in the two previous messages</li>
<li><em>key_fingerprint</em> is the value of the hash (last 64 bits of SHA-1) of the new key computed by A, for implementation sanity check</li>
</ul>
<p>After that, A can (and must) encrypt all following messages with the new key.</p>
<p>If side A wishes to delay installation of the new key, for example because there are some seq_no gaps that it wants to fill first, it must delay <a href="/constructor/decryptedMessageActionCommitKey">decryptedMessageActionCommitKey</a> answer accordingly.</p>
<h5><a class="anchor" href="#4-final-step" id="4-final-step" name="4-final-step"><i class="anchor-icon"></i></a>4. Final step</h5>
<p>When B receives either a <code>decryptedMessageActionCommitKey</code> or a message encrypted by the new key, recognized by the value of <em>key_fingerprint</em> prepended to the encrypted message (it may happen that the <code>decryptedMessageActionCommitKey</code> has been lost and will be re-requested later), it assumes that A has started using the new key for encryption, and does the same.</p>
<p>However, the previous key may be kept until there are no gaps in received messages up to the switch to the new key. Once all the gaps have been filled, the old key must be securely discarded.</p>
<p>There is one exception to this rule — the SHA-1 of the original key (generated during the establishment of Secret Chat in question) is always stored, in order to show <a href="#key-visualization">key visualizations</a> on the clients.</p>
<h4><a class="anchor" href="#aborting-protocol" id="aborting-protocol" name="aborting-protocol"><i class="anchor-icon"></i></a>Aborting protocol</h4>
<p>Any of the parties may abort any instance of an uncompleted re-keying protocol, unless <code>decryptedMessageActionCommitKey</code> or <code>decryptedMessageActionAcceptKey</code> has been already sent by the party in question. In order to abort re-keying, send</p>
<pre><code><a href='/constructor/decryptedMessageActionAbortKey'>decryptedMessageActionAbortKey</a> exchange_id:<a href='/type/long'>long</a> = <a href='/type/DecryptedMessageAction'>DecryptedMessageAction</a>;</code></pre>
<p>This could be done, for example, if the party is already participating in a different instance of the re-keying protocol, or if the received values of <em>g_a</em>, <em>g_b</em> and other parameters do not pass security checks. In the latter case, it might be advisable to abort the Secret Chat altogether.</p>
<h4><a class="anchor" href="#discarding-previous-keys" id="discarding-previous-keys" name="discarding-previous-keys"><i class="anchor-icon"></i></a>Discarding Previous Keys</h4>
<p>Once B receives <code>decryptedMessageActionCommitKey</code>, it can safely discard the previous key provided there are no gaps. However, A may only discard the previous key after a message encrypted with the new key has been received. If no ordinary messages are scheduled to be sent, a special <a href="/constructor/decryptedMessageActionNoop">no-op message</a> should sent by B for this purpose:</p>
<pre><code><a href='/constructor/decryptedMessageActionNoop'>decryptedMessageActionNoop</a> = <a href='/type/DecryptedMessageAction'>DecryptedMessageAction</a>;</code></pre>
<h4><a class="anchor" href="#concurrent-re-keying" id="concurrent-re-keying" name="concurrent-re-keying"><i class="anchor-icon"></i></a>Concurrent Re-Keying</h4>
<p>It may happen that both parties concurrently initiate re-keying by sending <code>decryptedMessageActionRequestKey</code> without knowing that the other party has already done so. If each side aborts re-keying because it is already participating in another instance of the protocol initiated by itself, the re-keying will never happen.</p>
<p>Because of this possibility, we suggest that only the instance with the smaller <em>exchange_id</em> is aborted, with the option to re-use its <em>(a,g_a)</em> for the re-keying protocol instance with the larger <em>exchange_id</em> (when compared as a <code>long</code>, i.e. signed little-endian 64-bit integer).</p>
<p>In other words, if a <code>decryptedMessageActionRequestKey</code> is received after A has sent its <code>decryptedMessageActionRequestKey</code>, but has not yet received <code>decryptedMessageActionAcceptKey</code>, the following is to be done:</p>
<ul>
<li>if <em>exchange_id</em> in the sent <code>decryptedMessageActionRequestKey</code> was larger than that in the <code>decryptionActionRequestKey</code> just received, abort the newly-suggested re-keying protocol instance without sending explicit <a href="/constructor/decryptedMessageActionAbortKey">decryptedMessageActionAbortKey</a> (the other side will do the same according to the next rule).</li>
<li>if <em>exchange_id</em> in our <code>decryptedMessageActionRequestKey</code> was smaller, respond to the newly-received <code>decryptedMessageActionRequestKey</code> with a <code>decryptedMessageActionAcceptKey</code>, and participate only in the re-keying protocol instance initiated by the other side. It is possible to re-use at this stage the value of <em>g_a</em> (now called <em>g_b</em>) that was generated for the original <code>decryptedMessageActionRequestKey</code>, now abandoned, or totally new <em>(b,g_b)</em> can be generated. </li>
<li>in the unlikely (2^{-64}) case both <em>exchange_id</em> are equal, abort both instances without sending an explicit <code>decryptedMessageActionAbortKey</code>. The other side will do the same.</li>
</ul>
<h5><a class="anchor" href="#key-visualization" id="key-visualization" name="key-visualization"><i class="anchor-icon"></i></a>Key Visualization</h5>
<p>Since all re-keying instances are carried over the secure channel established when the secret chat is created, it is necessary for the user to confirm that no MITM attack had taken place during the initial exchange. The key visualization on the clients uses the first 128-bits of the SHA-1 of the original key created when the Secret Chat was first established, followed by the first 160 bits of the SHA-256 of the key in use when the secret chat was updated to layer 46 (coincides with the original key if chat was created using layer 46).</p>
<blockquote>
<p>Please note that the <em>key_fingerprint</em> parameter was introduced as a maintenance tool (with a misleading name) and is <strong>not</strong> related to key visualization on the clients.</p>
</blockquote></div>
</div>
</div>
</div>
<div class="footer_wrap">
<div class="footer_columns_wrap footer_desktop">
<div class="footer_column footer_column_telegram">
<h5>Telegram</h5>
<div class="footer_telegram_description"></div>
Telegram is a cloud-based mobile and desktop messaging app with a focus on security and speed.
</div>
<div class="footer_column">
<h5><a href="//telegram.org/faq">About</a></h5>
<ul>
<li><a href="//telegram.org/faq">FAQ</a></li>
<li><a href="//telegram.org/blog">Blog</a></li>
<li><a href="//telegram.org/jobs">Jobs</a></li>
</ul>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps#mobile-apps">Mobile Apps</a></h5>
<ul>
<li><a href="//telegram.org/dl/ios">iPhone/iPad</a></li>
<li><a href="//telegram.org/dl/android">Android</a></li>
<li><a href="//telegram.org/dl/wp">Windows Phone</a></li>
</ul>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps#desktop-apps">Desktop Apps</a></h5>
<ul>
<li><a href="//desktop.telegram.org/">PC/Mac/Linux</a></li>
<li><a href="//macos.telegram.org/">macOS</a></li>
<li><a href="//telegram.org/dl/web">Web-browser</a></li>
</ul>
</div>
<div class="footer_column footer_column_platform">
<h5><a href="/">Platform</a></h5>
<ul>
<li><a href="/api">API</a></li>
<li><a href="//translations.telegram.org/">Translations</a></li>
<li><a href="//instantview.telegram.org/">Instant View</a></li>
</ul>
</div>
</div>
<div class="footer_columns_wrap footer_mobile">
<div class="footer_column">
<h5><a href="//telegram.org/faq">About</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/blog">Blog</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps">Apps</a></h5>
</div>
<div class="footer_column">
<h5><a href="/">Platform</a></h5>
</div>
<div class="footer_column">
<h5><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)">Twitter</a></h5>
</div>
</div>
</div>
</div>
<script src="/js/main.js?42"></script>
<script>backToTopInit("Go up");
removePreloadInit();
</script>
</body>
</html>
<!-- page generated in 20.52ms -->

View file

@ -0,0 +1,173 @@
<!DOCTYPE html>
<html class="">
<head>
<meta charset="utf-8">
<title>Sequence numbers in Secret Chats</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="It is necessary to interpret all messages in their original order to protect against reordering, reflection, replay, omission…">
<meta property="og:title" content="Sequence numbers in Secret Chats">
<meta property="og:image" content="">
<meta property="og:description" content="It is necessary to interpret all messages in their original order to protect against reordering, reflection, replay, omission…">
<link rel="shortcut icon" href="/favicon.ico?4" type="image/x-icon" />
<link href="/css/bootstrap.min.css?3" rel="stylesheet">
<link href="/css/telegram.css?212" rel="stylesheet" media="screen">
<style>
</style>
</head>
<body class="preload">
<div class="dev_page_wrap">
<div class="dev_page_head navbar navbar-static-top navbar-tg">
<div class="navbar-inner">
<div class="container clearfix">
<ul class="nav navbar-nav navbar-right hidden-xs"><li class="navbar-twitter"><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)"><i class="icon icon-twitter"></i><span> Twitter</span></a></li></ul>
<ul class="nav navbar-nav">
<li><a href="//telegram.org/">Home</a></li>
<li class="hidden-xs"><a href="//telegram.org/faq">FAQ</a></li>
<li class="hidden-xs"><a href="//telegram.org/apps">Apps</a></li>
<li class="active"><a href="/api">API</a></li>
<li class=""><a href="/mtproto">Protocol</a></li>
<li class=""><a href="/schema">Schema</a></li>
</ul>
</div>
</div>
</div>
<div class="container clearfix">
<div class="dev_page">
<div id="dev_page_content_wrap" class=" ">
<div class="dev_page_bread_crumbs"><ul class="breadcrumb clearfix"><li><a href="/api" >API</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/api/end-to-end" >Secret Chats</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/api/end-to-end%2Fseq_no" >Sequence numbers in Secret Chats</a></li></ul></div>
<h1 id="dev_page_title">Sequence numbers in Secret Chats</h1>
<div id="dev_page_content"><p>It is necessary to interpret <strong>all</strong> messages in their original order to protect against reordering, reflection, replay, omission and other manipulations (<a href="/constructor/decryptedMessageActionResend">decryptedMessageActionResend</a> messages are the only exception to this rule, see <a href="#avoiding-concurrent-gaps">avoiding concurrent gaps</a>). Secret chats support a special mechanism for handling <strong>seq_no</strong> counters independently from the server. Note that any <em>service messages</em> in secret chats must also increment the <strong>seq_no</strong>.</p>
<p>All Secret Chats messages in clients using Layer 17 or higher are wrapped in <a href="/constructor/decryptedMessageLayer">decryptedMessageLayer</a> and have <strong>seq_no</strong> (sequence number) counters attached to them. The <strong>seq_no</strong> counters in their raw form are initialized with <strong>(out_seq_no, in_seq_no) := (0,0)</strong>, and incremented strictly by 1 after any message (service or not) is sent/received and processed. They must be protected from mirroring before being sent to the remote client by transformation according to formula <strong>2*raw_seq_no+x</strong>, where <strong>x</strong> is 0 or 1, determined by the following rule:</p>
<table class="table">
<tbody>
<tr>
<td><strong>in_seq_no</strong></td>
<td><strong>out_seq_no</strong></td>
</tr>
<tr>
<td>secret chat initiated by sender</td>
<td>0</td>
<td>1</td>
</tr>
<tr>
<td>secret chat initiated by recipient</td>
<td>1</td>
<td>0</td>
</tr>
</tbody>
</table>
<p>In this way the least significant bit of each <strong>seq_no</strong> field included in the message is different for incoming and outgoing messages. This is done to prevent a possible attacker from mirroring the messages. If any of the received <strong>in_seq_no</strong> or <strong>out_seq_no</strong> are not consistent in terms of parity (see table above), the client is required to immediately abort the secret chat.</p>
<blockquote>
<p>E.g., the first message the local client sends to any secret chat will have <strong>out_seq_no</strong> of <strong>0+x_out</strong>, the second one will have <strong>out_seq_no</strong> of <strong>2*1+x_out</strong>, and so on, where <strong>x_out</strong> is 0 if the chat was initiated by the remote client, 1 otherwise; similarly for the received messages, but there <strong>x_in</strong> is used instead of <strong>x_out</strong> and is equal to 0 if the chat was initiated by the local client, 1 otherwise. </p>
</blockquote>
<p>Raw sequence numbers will be used in the remaining part of this text, unless otherwise specified.</p>
<h4><a class="anchor" href="#preventing-gaps" id="preventing-gaps" name="preventing-gaps"><i class="anchor-icon"></i></a>Preventing gaps</h4>
<p>Your client must ensure that all outgoing secret chat messages are queued on the server in the correct order. This is achieved by correctly placing them into the <a href="/method/invokeAfterMsgs">invokeAfterMsgs</a> chain. Failure to do this may result in gaps on the remote client, which may in turn lead to aborted secret chats. The local client must maintain the correct sequence of <strong>in_seq_no</strong> for the remote client. To achieve this, assign <strong>in_seq_no</strong> and <strong>out_seq_no</strong> to each message at the <em>exact</em> moment when the message is created, and never change them in the future.</p>
<h2><a class="anchor" href="#security-checks" id="security-checks" name="security-checks"><i class="anchor-icon"></i></a>Security checks</h2>
<h4><a class="anchor" href="#checking-out-seq-no" id="checking-out-seq-no" name="checking-out-seq-no"><i class="anchor-icon"></i></a>Checking out_seq_no</h4>
<p>Your client must check that it has received <em>each</em> message with the sequence number <strong>out_seq_no</strong> starting from 0 to some current point <strong>C</strong>. It should then expect the next message to have the sequence number <strong>out_seq_no=C+1</strong>. If the <strong>out_seq_no</strong> in the received message does not match this, the following needs to be done:</p>
<ul>
<li>If the received <strong>out_seq_no&lt;=C</strong>, the local client must drop the message (repeated message). The client should not check the contents of the message because the original message could have been deleted (see <a href="#deleting-unacknowledged-messages">Deleting unacknowledged messages</a>).</li>
<li>If the received <strong>out_seq_no&gt;C+1</strong>, it most likely means that the server left out some messages due to a technical failure or due to the messages becoming obsolete. A temporary solution to this is to simply abort the secret chat. But since this may cause some existing older secret chats to be aborted, it is strongly recommended for the client to properly handle such <strong>seq_no</strong> gaps. Note that <strong>in_seq_no</strong> is not increased upon receipt of such a message; it is advanced only after all preceding gaps are filled.</li>
</ul>
<h4><a class="anchor" href="#proper-handling-of-gaps" id="proper-handling-of-gaps" name="proper-handling-of-gaps"><i class="anchor-icon"></i></a>Proper handling of gaps</h4>
<p>In order to correctly handle incoming messages after a hole has been identified (when received <strong>out_seq_no&gt;C+1</strong>), it is necessary to put received messages with the wrong <strong>seq_no</strong> into a "waiting queue" on the local client, and to re-request the missing messages using the special constructor <a href="/constructor/decryptedMessageActionResend">decryptedMessageActionResend</a> <code>start_seq_no:<a href='/type/int'>int</a> end_seq_no:<a href='/type/int'>int</a> = <a href='/type/DecryptedMessageAction'>DecryptedMessageAction</a>;</code>. The sequence numbers used in this constructor must be ready for interpretation by the remote client and therefore <em>cannot</em> be in their raw form: you can easily get the necessary <strong>start_seq_no</strong> by adding 2 to the <strong>out_seq_no</strong> of the last message before the hole and the <strong>end_seq_no</strong> by subtracting 2 from the <strong>out_seq_no</strong> of the received message with the wrong sequence number.</p>
<p>Each hole normally requires only one request to resend messages — if the remote client keeps sending out of sync messages, they should be put into the queue without sending a new request. Having received the missing messages, the local client must first interpret these messages in the right order by their <strong>seq_no</strong>. Once this is done, the client can proceed to interpret messages from the queue (again, in the right <strong>seq_no</strong> order).</p>
<p>Special cases:</p>
<ul>
<li>Note that having <em>two</em> gaps simultaneously is very rare (provided that the remote client and server are operating normally) and it is acceptable to abort the secret chat in this situation.</li>
<li>If a local client receives <a href="/constructor/decryptedMessageActionResend">decryptedMessageActionResend</a> but is unable to satisfy the request, it must abort the secret chat.</li>
</ul>
<h4><a class="anchor" href="#avoiding-concurrent-gaps" id="avoiding-concurrent-gaps" name="avoiding-concurrent-gaps"><i class="anchor-icon"></i></a>Avoiding concurrent gaps</h4>
<p>In order to avoid getting stuck with concurrent gaps on both sides, <a href="/constructor/decryptedMessageActionResend">decryptedMessageActionResend</a> must always be interpreted <em>immediately upon receipt</em> in all cases, even if its <strong>out_seq_no&gt;=C+1</strong>. Note that each <a href="/constructor/decryptedMessageActionResend">decryptedMessageActionResend</a> must only be handled once, it must not be interpreted again when we interpret messages in the queue.</p>
<h4><a class="anchor" href="#checking-and-handling-in-seq-no" id="checking-and-handling-in-seq-no" name="checking-and-handling-in-seq-no"><i class="anchor-icon"></i></a>Checking and handling in_seq_no</h4>
<p><strong>in_seq_no</strong> of all received messages must be <em>valid</em>. To ensure this, perform the following checks:</p>
<ul>
<li><strong>in_seq_no</strong> must form a non-decreasing sequence of non-negative integer numbers.</li>
<li><strong>in_seq_no</strong> must be valid at the moment of receiving the message, that is, if <strong>D</strong> is the <strong>out_seq_no</strong> of last message we sent, the received <strong>in_seq_no</strong> should not be greater than <strong>D + 1</strong>. This also allows us to insert the received message into its correct place in the secret chat. For example, imagine that the local client has sent 5 secret chat messages, and then receives a secret chat message with the text "Yes" and <strong>in_seq_no=2</strong>. In this situation the local client <em>must</em> place that message after the second message it sent. This makes manipulations with delayed messages impossible.</li>
</ul>
<p>If <code>in_seq_no</code> contradicts these criteria, the local client is required to immediately abort the secret chat. This could happen only in case of malicious or buggy behaviour on either server or remote client side.</p>
<h4><a class="anchor" href="#deleting-unacknowledged-messages" id="deleting-unacknowledged-messages" name="deleting-unacknowledged-messages"><i class="anchor-icon"></i></a>Deleting unacknowledged messages</h4>
<p>In case the user on the local client has deleted a message <em>before</em> the server (or the remote client, if <a href="/constructor/decryptedMessageActionResend">decryptedMessageActionResend</a> is handled correctly) could acknowledge the message, for security reasons, you must:</p>
<ul>
<li>securely destroy the contents of the message (as in case of any other deleted Secret Chat message);</li>
<li>change the local copy of the original message to <code>decryptedMessageActionDeleteMessages</code> with <strong>random_id</strong> equal to its own <strong>random_id</strong>;</li>
<li>create a new outgoing message deleting the original message.</li>
</ul>
<p>This must be done because your client doesn't know whether the remote client really received the message or not. In the case the message was already received, it will be deleted by the second message; otherwise it must arrive as a "self-delete" message to maintain the correct sequence of seq_no.</p></div>
</div>
</div>
</div>
<div class="footer_wrap">
<div class="footer_columns_wrap footer_desktop">
<div class="footer_column footer_column_telegram">
<h5>Telegram</h5>
<div class="footer_telegram_description"></div>
Telegram is a cloud-based mobile and desktop messaging app with a focus on security and speed.
</div>
<div class="footer_column">
<h5><a href="//telegram.org/faq">About</a></h5>
<ul>
<li><a href="//telegram.org/faq">FAQ</a></li>
<li><a href="//telegram.org/blog">Blog</a></li>
<li><a href="//telegram.org/jobs">Jobs</a></li>
</ul>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps#mobile-apps">Mobile Apps</a></h5>
<ul>
<li><a href="//telegram.org/dl/ios">iPhone/iPad</a></li>
<li><a href="//telegram.org/dl/android">Android</a></li>
<li><a href="//telegram.org/dl/wp">Windows Phone</a></li>
</ul>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps#desktop-apps">Desktop Apps</a></h5>
<ul>
<li><a href="//desktop.telegram.org/">PC/Mac/Linux</a></li>
<li><a href="//macos.telegram.org/">macOS</a></li>
<li><a href="//telegram.org/dl/web">Web-browser</a></li>
</ul>
</div>
<div class="footer_column footer_column_platform">
<h5><a href="/">Platform</a></h5>
<ul>
<li><a href="/api">API</a></li>
<li><a href="//translations.telegram.org/">Translations</a></li>
<li><a href="//instantview.telegram.org/">Instant View</a></li>
</ul>
</div>
</div>
<div class="footer_columns_wrap footer_mobile">
<div class="footer_column">
<h5><a href="//telegram.org/faq">About</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/blog">Blog</a></h5>
</div>
<div class="footer_column">
<h5><a href="//telegram.org/apps">Apps</a></h5>
</div>
<div class="footer_column">
<h5><a href="/">Platform</a></h5>
</div>
<div class="footer_column">
<h5><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)">Twitter</a></h5>
</div>
</div>
</div>
</div>
<script src="/js/main.js?42"></script>
<script>backToTopInit("Go up");
removePreloadInit();
</script>
</body>
</html>
<!-- page generated in 22.13ms -->

Some files were not shown because too many files have changed in this diff Show more