mirror of
https://github.com/MarshalX/telegram-crawler.git
synced 2024-12-28 15:31:11 +01:00
Update content of files
This commit is contained in:
parent
4a0df65f30
commit
077a39edf0
1 changed files with 29 additions and 8 deletions
|
@ -60,6 +60,27 @@
|
|||
<p>The action bar is represented by the <a href="/constructor/peerSettings">peerSettings</a> constructor, fetchable using <a href="/method/messages.getPeerSettings">messages.getPeerSettings</a>; it is also contained in the <a href="/constructor/userFull">userFull</a> constructor returned by <a href="/method/users.getFullUser">users.getFullUser</a>.</p>
|
||||
<p>Changes to the chat bar may also be notified by the server using <a href="/constructor/updatePeerSettings">updatePeerSettings</a>. </p>
|
||||
<p>What follows is a list of the various (<em>mutually exclusive</em>) chat bar types, along with the <strong>condition</strong> used to identify each type, by checking the appropriate flags of <a href="/constructor/peerSettings">peerSettings</a>. </p>
|
||||
<h2><a class="anchor" href="#report-spam-block-or-add-contact" id="report-spam-block-or-add-contact" name="report-spam-block-or-add-contact"><i class="anchor-icon"></i></a>Report spam, block or add contact</h2>
|
||||
<pre><code><a href='/constructor/inputReportReasonSpam'>inputReportReasonSpam</a>#58dbcab8 = <a href='/type/ReportReason'>ReportReason</a>;
|
||||
|
||||
---functions---
|
||||
|
||||
<a href='/method/account.reportPeer'>account.reportPeer</a>#c5ba3d86 peer:<a href='/type/InputPeer'>InputPeer</a> reason:<a href='/type/ReportReason'>ReportReason</a> message:<a href='/type/string'>string</a> = <a href='/type/Bool'>Bool</a>;
|
||||
|
||||
<a href='/method/contacts.addContact'>contacts.addContact</a>#e8f463d0 flags:<a href='/type/%23'>#</a> add_phone_privacy_exception:flags.0?<a href='/constructor/true'>true</a> id:<a href='/type/InputUser'>InputUser</a> first_name:<a href='/type/string'>string</a> last_name:<a href='/type/string'>string</a> phone:<a href='/type/string'>string</a> = <a href='/type/Updates'>Updates</a>;
|
||||
|
||||
<a href='/method/contacts.block'>contacts.block</a>#2e2e8734 flags:<a href='/type/%23'>#</a> my_stories_from:flags.0?<a href='/constructor/true'>true</a> id:<a href='/type/InputPeer'>InputPeer</a> = <a href='/type/Bool'>Bool</a>;</code></pre>
|
||||
<p>This action bar, associated to a private or secret chat, offers the user buttons to:</p>
|
||||
<ul>
|
||||
<li>Report the chat for spam using <a href="/method/account.reportPeer">account.reportPeer</a> and <a href="/constructor/inputReportReasonSpam">inputReportReasonSpam</a>.<br>
|
||||
If the other user has an emoji status, then the bar should also show a notice, indicating that the emoji status is shown next to the user's name because they have purchased <a href="/api/premium">Telegram Premium</a> (i.e. this is useful to avoid issues if the user uses an emoji status similar to a verified checkmark).<br>
|
||||
Additionally, if the chat was automatically <a href="/api/folders#peer-folders">archived »</a>, an extra button can be shown to unarchive the chat <a href="/api/folders#peer-folders">as specified here »</a> instead of reporting it.</li>
|
||||
<li>Add the other user of the chat to the contact list using <a href="/method/contacts.addContact">contacts.addContact</a>.<br>
|
||||
Optionally, the <a href="/constructor/peerSettings">peerSettings</a>.<code>need_contacts_exception</code> flag may also be set: if so, the <code>add_phone_privacy_exception</code> flag <strong>must</strong> be set if the user clicks on the add contact button, invoking <a href="/method/contacts.addContact">contacts.addContact</a>. </li>
|
||||
<li>Block the other user of the chat from writing to us using <a href="/method/contacts.block">contacts.block</a> (without setting the <code>my_stories_from</code> flag). </li>
|
||||
</ul>
|
||||
<p><strong>Condition</strong>: the <a href="/constructor/peerSettings">peerSettings</a>.<code>report_spam</code>, <a href="/constructor/peerSettings">peerSettings</a>.<code>add_contact</code>, <a href="/constructor/peerSettings">peerSettings</a>.<code>block_contact</code> flags must all be set.</p>
|
||||
<p>Additionally, if the <a href="/constructor/peerSettings">peerSettings</a>.<code>geo_distance</code> flag is set, the bar should also display the distance between us and the user, indicating that the user found us by invoking <a href="/method/contacts.getLocated">contacts.getLocated</a>, because we are currently advertising our location with the same method.</p>
|
||||
<h2><a class="anchor" href="#report-spam-or-unarchive" id="report-spam-or-unarchive" name="report-spam-or-unarchive"><i class="anchor-icon"></i></a>Report spam or unarchive</h2>
|
||||
<pre><code><a href='/constructor/inputReportReasonSpam'>inputReportReasonSpam</a>#58dbcab8 = <a href='/type/ReportReason'>ReportReason</a>;
|
||||
|
||||
|
@ -67,19 +88,19 @@
|
|||
|
||||
<a href='/method/account.reportPeer'>account.reportPeer</a>#c5ba3d86 peer:<a href='/type/InputPeer'>InputPeer</a> reason:<a href='/type/ReportReason'>ReportReason</a> message:<a href='/type/string'>string</a> = <a href='/type/Bool'>Bool</a>;</code></pre>
|
||||
<p>This action bar, associated to a private or secret chat, offers the user a button to report the chat for spam using <a href="/method/account.reportPeer">account.reportPeer</a> and <a href="/constructor/inputReportReasonSpam">inputReportReasonSpam</a>. </p>
|
||||
<p><strong>Condition</strong>: the <a href="/constructor/peerSettings">peerSettings</a>.<code>report_spam</code> flag must be set.</p>
|
||||
<p>If the other user has an emoji status, then the bar should also show a notice, indicating that the emoji status is shown next to the user's name because they have purchased <a href="/api/premium">Telegram Premium</a> (i.e. this is useful to avoid issues if the user uses an emoji status similar to a verified checkmark). </p>
|
||||
<p><strong>Condition</strong>: the <a href="/constructor/peerSettings">peerSettings</a>.<code>report_spam</code> flag must be set, and the <a href="/constructor/peerSettings">peerSettings</a>.<code>add_contact</code>, <a href="/constructor/peerSettings">peerSettings</a>.<code>block_contact</code> flags must <strong>not</strong> be set.</p>
|
||||
<p>Additionally, if the chat was automatically <a href="/api/folders#peer-folders">archived »</a>, an extra button can be shown to unarchive the chat <a href="/api/folders#peer-folders">as specified here »</a> instead of reporting it.</p>
|
||||
<h2><a class="anchor" href="#report-spam-block-or-add-contact" id="report-spam-block-or-add-contact" name="report-spam-block-or-add-contact"><i class="anchor-icon"></i></a>Report spam, block or add contact</h2>
|
||||
<h2><a class="anchor" href="#add-contact" id="add-contact" name="add-contact"><i class="anchor-icon"></i></a>Add contact</h2>
|
||||
<p>Schema:</p>
|
||||
<pre><code><a href='/constructor/contacts.addContact'>contacts.addContact</a>#e8f463d0 flags:<a href='/type/%23'>#</a> add_phone_privacy_exception:flags.0?<a href='/constructor/true'>true</a> id:<a href='/type/InputUser'>InputUser</a> first_name:<a href='/type/string'>string</a> last_name:<a href='/type/string'>string</a> phone:<a href='/type/string'>string</a> = <a href='/type/Updates'>Updates</a>;</code></pre>
|
||||
<p>This action bar, associated to a private or secret chat, offers the user a button to share their phone number with the other user using <a href="/method/contacts.acceptContact">contacts.acceptContact</a>. </p>
|
||||
<p><strong>Conditions</strong>:</p>
|
||||
<pre><code><a href='/method/contacts.addContact'>contacts.addContact</a>#e8f463d0 flags:<a href='/type/%23'>#</a> add_phone_privacy_exception:flags.0?<a href='/constructor/true'>true</a> id:<a href='/type/InputUser'>InputUser</a> first_name:<a href='/type/string'>string</a> last_name:<a href='/type/string'>string</a> phone:<a href='/type/string'>string</a> = <a href='/type/Updates'>Updates</a>;</code></pre>
|
||||
<p>This action bar, associated to a private or secret chat, offers the user a button to add the other user of the chat to the contact list using <a href="/method/contacts.addContact">contacts.addContact</a>. </p>
|
||||
<p><strong>Conditions</strong>: the <a href="/constructor/peerSettings">peerSettings</a>.<code>add_contact</code> flag must be set <strong>and</strong>:</p>
|
||||
<ul>
|
||||
<li>For secret chats, the <a href="/constructor/peerSettings">peerSettings</a>.<code>add_contact</code> flag must be set and the chat must not be archived.</li>
|
||||
<li>For private chats, the <a href="/constructor/peerSettings">peerSettings</a>.<code>add_contact</code> flag must be set, and the <code>block_contact</code> and <code>report_spam</code> flags must <strong>not</strong> be set.</li>
|
||||
<li>For secret chats, the chat must <strong>not</strong> be archived.</li>
|
||||
<li>For private chats, the <code>block_contact</code> and <code>report_spam</code> flags must <strong>not</strong> be set.</li>
|
||||
</ul>
|
||||
<p>Optionally, the <a href="/constructor/peerSettings">peerSettings</a>.<code>need_contacts_exception</code> flag may also be set: if so, the <code>add_phone_privacy_exception</code> flag <strong>must</strong> be set if the user clicks on the add contact button, invoking <a href="/method/contacts.acceptContact">contacts.acceptContact</a>. </p>
|
||||
<p>Optionally, the <a href="/constructor/peerSettings">peerSettings</a>.<code>need_contacts_exception</code> flag may also be set: if so, the <code>add_phone_privacy_exception</code> flag <strong>must</strong> be set if the user clicks on the add contact button, invoking <a href="/method/contacts.addContact">contacts.addContact</a>. </p>
|
||||
<h2><a class="anchor" href="#share-phone-number" id="share-phone-number" name="share-phone-number"><i class="anchor-icon"></i></a>Share phone number</h2>
|
||||
<p>Schema:</p>
|
||||
<pre><code><a href='/constructor/contacts.acceptContact'>contacts.acceptContact</a>#f831a20f id:<a href='/type/InputUser'>InputUser</a> = <a href='/type/Updates'>Updates</a>;</code></pre>
|
||||
|
|
Loading…
Reference in a new issue