mirror of
https://github.com/MarshalX/telegram-crawler.git
synced 2024-12-29 15:59:13 +01:00
Update content of files
This commit is contained in:
parent
596b53adbd
commit
ca2b5c3581
2 changed files with 15 additions and 14 deletions
|
@ -226,23 +226,24 @@ t.me/share/url?url=<url>&text=<text></code></pre>
|
|||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h3><a class="anchor" href="#voice-chatvideo-chatlivestream-links" id="voice-chatvideo-chatlivestream-links" name="voice-chatvideo-chatlivestream-links"><i class="anchor-icon"></i></a>Voice chat/Video chat/Livestream links</h3>
|
||||
<p>Used to join voice chats and video chats in groups, and livestreams in channels.<br>
|
||||
Such links are generated using <a href="/method/phone.exportGroupCallInvite">phone.exportGroupCallInvite</a>. </p>
|
||||
<h3><a class="anchor" href="#video-chatlivestream-links" id="video-chatlivestream-links" name="video-chatlivestream-links"><i class="anchor-icon"></i></a>Video chat/Livestream links</h3>
|
||||
<p>Used to join video/voice chats in groups, and livestreams in channels.<br>
|
||||
Such links are generated using <a href="/method/phone.exportGroupCallInvite">phone.exportGroupCallInvite</a>.<br>
|
||||
Note that <code>voicechat</code> links are deprecated, the API will always export <code>videochat</code> links even for voice chats, clients should support parsing the old link format only for backwards compatibility. </p>
|
||||
<p><code>t.me</code> syntax:</p>
|
||||
<pre><code>t.me/<username>?voicechat
|
||||
t.me/<username>?voicechat=<invite_hash>
|
||||
t.me/<username>?videochat
|
||||
<pre><code>t.me/<username>?videochat
|
||||
t.me/<username>?videochat=<invite_hash>
|
||||
t.me/<username>?livestream
|
||||
t.me/<username>?livestream=<invite_hash></code></pre>
|
||||
t.me/<username>?livestream=<invite_hash>
|
||||
t.me/<username>?voicechat
|
||||
t.me/<username>?voicechat=<invite_hash></code></pre>
|
||||
<p><code>tg:</code> syntax:</p>
|
||||
<pre><code>tg://resolve?domain=<username>&voicechat
|
||||
tg://resolve?domain=<username>&voicechat=<invite_hash>
|
||||
tg://resolve?domain=<username>&videochat
|
||||
<pre><code>tg://resolve?domain=<username>&videochat
|
||||
tg://resolve?domain=<username>&videochat=<invite_hash>
|
||||
tg://resolve?domain=<username>&livestream
|
||||
tg://resolve?domain=<username>&livestream=<invite_hash></code></pre>
|
||||
tg://resolve?domain=<username>&livestream=<invite_hash>
|
||||
tg://resolve?domain=<username>&voicechat
|
||||
tg://resolve?domain=<username>&voicechat=<invite_hash></code></pre>
|
||||
<p>Parameters:</p>
|
||||
<table class="table">
|
||||
<thead>
|
||||
|
|
|
@ -46,7 +46,7 @@
|
|||
|
||||
<p>When interacting with HTML5 games, websites of payment gateways and <a href="/api/bots/webapps">bot web apps</a>, Telegram apps should expose APIs to allow receiving data and events from the websites.</p>
|
||||
<h3><a class="anchor" href="#event-apis" id="event-apis" name="event-apis"><i class="anchor-icon"></i></a>Event APIs</h3>
|
||||
<p>Games and payment gateways can generate events that are meant to be received by the Telegram apps.
|
||||
<p>Games, payment gateways and <a href="/api/bots/webapps">bot web apps</a> can generate events that are meant to be received by the Telegram apps.
|
||||
Typically events are generated by using the <code>postEvent</code> method of the <a href="https://github.com/TelegramMessenger/GamingCommunication/blob/master/games.js">GamingCommunication library</a>, or by the <a href="/bots/webapps#initializing-web-apps">bot web apps library</a>.<br>
|
||||
The <code>postEvent</code> function will try sending the event to the Telegram app in a number of different ways.</p>
|
||||
<h4><a class="anchor" href="#webviewproxy" id="webviewproxy" name="webviewproxy"><i class="anchor-icon"></i></a>WebviewProxy</h4>
|
||||
|
@ -56,8 +56,8 @@ The <code>postEvent</code> function will try sending the event to the Telegram a
|
|||
<p>Alternatively, a <code>window.external.notify</code> method can be exposed, accepting a string JSON payload with the event type and payload:</p>
|
||||
<pre><code>window.external.notify(JSON.stringify({eventType: eventType, eventData: eventData}));</code></pre>
|
||||
<h4><a class="anchor" href="#postmessage-api" id="postmessage-api" name="postmessage-api"><i class="anchor-icon"></i></a>postMessage API</h4>
|
||||
<p>Finally, web MTProto clients that need to open a game or process a payment in an iframe can use the <a href="https://developer.mozilla.org/en-US/docs/Web/API/Window/postMessage">postMessage API</a> to receive events from iframes.
|
||||
The GamingCommunication and bot web app libraries by default will use <code>'*'</code> as <code>targetOrigin</code>, sending messages to parent pages regardless of the origin of the embedder.</p>
|
||||
<p>Finally, web MTProto clients that need to open a game, open a <a href="/api/bots/webapps">bot web app</a> or process a payment in an iframe can use the <a href="https://developer.mozilla.org/en-US/docs/Web/API/Window/postMessage">postMessage API</a> to receive events from iframes.<br>
|
||||
The GamingCommunication and bot web apps libraries by default will use <code>'*'</code> as <code>targetOrigin</code>, sending messages to parent pages regardless of the origin of the embedder.</p>
|
||||
<pre><code>window.parent.postMessage(JSON.stringify({eventType: eventType, eventData: eventData}), targetOrigin);</code></pre>
|
||||
<h3><a class="anchor" href="#event-types" id="event-types" name="event-types"><i class="anchor-icon"></i></a>Event types</h3>
|
||||
<p><code>eventType</code> is a simple string indicating the event type, and <code>eventData</code> is a payload with an object that will be parsed by the Telegram app.</p>
|
||||
|
|
Loading…
Reference in a new issue