mirror of
https://github.com/MarshalX/telegram-crawler.git
synced 2025-03-14 04:51:42 +01:00
Update content of files
This commit is contained in:
parent
70f965d87a
commit
bf60f0a641
2 changed files with 39 additions and 2 deletions
|
@ -72,7 +72,7 @@
|
|||
|
||||
<a href='/method/messages.reportReaction'>messages.reportReaction</a>#3f64c076 peer:<a href='/type/InputPeer'>InputPeer</a> id:<a href='/type/int'>int</a> reaction_peer:<a href='/type/InputPeer'>InputPeer</a> = <a href='/type/Bool'>Bool</a>;</code></pre>
|
||||
<p>Users can react to a message with one or more reactions using <a href="/method/messages.sendReaction">messages.sendReaction</a>.<br>
|
||||
After sending the reaction, the <code>chosen_order</code> field of <a href="/constructor/reactionCount">reactionCount</a> will be set for the reaction. The integer value indicates when was the reaction added: the bigger the value, the newer the reaction, use this value to appropriately sort the <code>messages.sendReaction:reaction</code> vector when adding new reactions.<br>
|
||||
After sending the reaction, the <code>chosen_order</code> field of <a href="/constructor/reactionCount">reactionCount</a> (in <a href="/constructor/messageReactions">messageReactions</a>) will be set for the reaction. The integer value indicates when was the reaction added: the bigger the value, the newer the reaction, use this value to appropriately sort the <code>messages.sendReaction:reaction</code> vector when adding new reactions.<br>
|
||||
Reactions should be sent in <strong>ascending order</strong> (new reactions at the end in the <code>messages.sendReaction:reaction</code> vector), and when adding more reactions to the same message, older reactions should be removed to keep the total number of sent reactions within <a href="/api/config#reactions-user-max-default">reactions_user_max_default</a>/<a href="/api/config#reactions-user-max-premium">reactions_user_max_premium</a> reactions.<br>
|
||||
The <a href="/api/config#reactions-uniq-max">reactions_uniq_max</a> configuration field also indicates the maximum number of unique reactions that can be added to a message: for example, if there are 2000 <img class="emoji" src="//telegram.org/img/emoji/40/F09F918D.png" width="20" height="20" alt="👍" /> and 1000 custom emoji <img class="emoji" src="//telegram.org/img/emoji/40/F09F9881.png" width="20" height="20" alt="😁" /> reactions and reactions_uniq_max = 2, you can't add a <img class="emoji" src="//telegram.org/img/emoji/40/F09F918E.png" width="20" height="20" alt="👎" /> reaction, because that would raise the number of unique reactions to 3 > 2. </p>
|
||||
<p>The <code>big</code> flag can be optionally set to elicit a bigger reaction.<br>
|
||||
|
@ -84,6 +84,7 @@ Apps should short-poll reactions for visible messages (that weren't sent by the
|
|||
In groups, <a href="/method/messages.reportReaction">messages.reportReaction</a> can be used to report a certain <a href="/api/custom-emoji">custom emoji</a> reaction, specifying the <code>peer</code>, the message <code>id</code> and the user that sent the reaction (<code>reaction_peer</code>). </p>
|
||||
<p><a href="/method/messages.getUnreadReactions">messages.getUnreadReactions</a> is used to fetch messages with unread reactions.<br>
|
||||
Use <a href="/method/messages.readReactions">messages.readReactions</a> to mark all reactions as read in a certain chat.</p>
|
||||
<p>For <a href="/api/saved-messages">saved messages</a>, if the <code>reactions_as_tags</code> flag of <a href="/constructor/messageReactions">messageReactions</a> is set, or if there are no reactions, all present and future reactions should be treated as <a href="/api/saved-messages#tags">message tags, see here » for more info</a>.</p>
|
||||
<h3><a class="anchor" href="#react-to-a-story" id="react-to-a-story" name="react-to-a-story"><i class="anchor-icon"></i></a>React to a story</h3>
|
||||
<p>See <a href="/api/stories#reactions">here »</a> for more info on how to react to a story.</p>
|
||||
<h3><a class="anchor" href="#animated-normal-emojis" id="animated-normal-emojis" name="animated-normal-emojis"><i class="anchor-icon"></i></a>Animated normal emojis</h3>
|
||||
|
|
|
@ -127,7 +127,43 @@ if (message.peer_id == user_id) {
|
|||
}</code></pre>
|
||||
<p>Sending (not forwarding from another dialog) new messages directly to ourselves will add them to a saved dialog entry with ourselves. </p>
|
||||
<p>A set of methods can then be used to obtain this dialog list, pin/unpin dialogs inside of it, view and remove messages from saved dialogs: <a href="/method/messages.getSavedDialogs">messages.getSavedDialogs</a>, <a href="/method/messages.getSavedHistory">messages.getSavedHistory</a>, <a href="/method/messages.deleteSavedHistory">messages.deleteSavedHistory</a>, <a href="/method/messages.getPinnedSavedDialogs">messages.getPinnedSavedDialogs</a>, <a href="/method/messages.toggleSavedDialogPin">messages.toggleSavedDialogPin</a>, <a href="/method/messages.reorderPinnedSavedDialogs">messages.reorderPinnedSavedDialogs</a> work just like their counterparts <a href="/method/messages.getDialogs">messages.getDialogs</a>, <a href="/method/messages.getHistory">messages.getHistory</a>, <a href="/method/messages.deleteHistory">messages.deleteHistory</a>, <a href="/method/messages.getPinnedDialogs">messages.getPinnedDialogs</a>, <a href="/method/messages.toggleDialogPin">messages.toggleDialogPin</a>, <a href="/method/messages.reorderPinnedDialogs">messages.reorderPinnedDialogs</a>, with the sole difference that they affect the saved dialog list, instead of the main dialog list. </p>
|
||||
<p>To search for messages within a saved dialog, use the usual <a href="/method/messages.search">messages.search</a>, <a href="/method/messages.getSearchCounters">messages.getSearchCounters</a>, <a href="/method/messages.getSearchResultsCalendar">messages.getSearchResultsCalendar</a>, <a href="/method/messages.getSearchResultsPositions">messages.getSearchResultsPositions</a> methods with <code>peer</code>=<a href="/constructor/inputPeerSelf">inputPeerSelf</a> and <code>saved_peer_id</code>=id of the saved dialog.</p></div>
|
||||
<p>To search for messages within a saved dialog, use the usual <a href="/method/messages.search">messages.search</a>, <a href="/method/messages.getSearchCounters">messages.getSearchCounters</a>, <a href="/method/messages.getSearchResultsCalendar">messages.getSearchResultsCalendar</a>, <a href="/method/messages.getSearchResultsPositions">messages.getSearchResultsPositions</a> methods with <code>peer</code>=<a href="/constructor/inputPeerSelf">inputPeerSelf</a> and <code>saved_peer_id</code>=id of the saved dialog. </p>
|
||||
<h3><a class="anchor" href="#tags" id="tags" name="tags"><i class="anchor-icon"></i></a>Tags</h3>
|
||||
<p>For even more organization, you can add <strong>multiple tags</strong> to your Saved Messages that let you quickly <strong>filter</strong> them in Search.</p>
|
||||
<pre><code><a href='/constructor/messageReactions'>messageReactions</a>#4f2b9479 flags:<a href='/type/%23'>#</a> min:flags.0?<a href='/constructor/true'>true</a> can_see_list:flags.2?<a href='/constructor/true'>true</a> reactions_as_tags:flags.3?<a href='/constructor/true'>true</a> results:<a href='/type/Vector%20t'>Vector</a><<a href='/type/ReactionCount'>ReactionCount</a>> recent_reactions:flags.1?<a href='/type/Vector%20t'>Vector</a><<a href='/type/MessagePeerReaction'>MessagePeerReaction</a>> = <a href='/type/MessageReactions'>MessageReactions</a>;
|
||||
|
||||
<a href='/constructor/savedReactionTag'>savedReactionTag</a>#cb6ff828 flags:<a href='/type/%23'>#</a> reaction:<a href='/type/Reaction'>Reaction</a> title:flags.0?<a href='/type/string'>string</a> count:<a href='/type/int'>int</a> = <a href='/type/SavedReactionTag'>SavedReactionTag</a>;
|
||||
|
||||
<a href='/constructor/messages.savedReactionTagsNotModified'>messages.savedReactionTagsNotModified</a>#889b59ef = <a href='/type/messages.SavedReactionTags'>messages.SavedReactionTags</a>;
|
||||
<a href='/constructor/messages.savedReactionTags'>messages.savedReactionTags</a>#3259950a tags:<a href='/type/Vector%20t'>Vector</a><<a href='/type/SavedReactionTag'>SavedReactionTag</a>> hash:<a href='/type/long'>long</a> = <a href='/type/messages.SavedReactionTags'>messages.SavedReactionTags</a>;
|
||||
|
||||
<a href='/constructor/updateSavedReactionTags'>updateSavedReactionTags</a>#39c67432 = <a href='/type/Update'>Update</a>;
|
||||
|
||||
---functions---
|
||||
|
||||
<a href='/method/messages.sendReaction'>messages.sendReaction</a>#d30d78d4 flags:<a href='/type/%23'>#</a> big:flags.1?<a href='/constructor/true'>true</a> add_to_recent:flags.2?<a href='/constructor/true'>true</a> peer:<a href='/type/InputPeer'>InputPeer</a> msg_id:<a href='/type/int'>int</a> reaction:flags.0?<a href='/type/Vector%20t'>Vector</a><<a href='/type/Reaction'>Reaction</a>> = <a href='/type/Updates'>Updates</a>;
|
||||
|
||||
<a href='/method/messages.search'>messages.search</a>#29ee847a flags:<a href='/type/%23'>#</a> peer:<a href='/type/InputPeer'>InputPeer</a> q:<a href='/type/string'>string</a> from_id:flags.0?<a href='/type/InputPeer'>InputPeer</a> saved_peer_id:flags.2?<a href='/type/InputPeer'>InputPeer</a> saved_reaction:flags.3?<a href='/type/Vector%20t'>Vector</a><<a href='/type/Reaction'>Reaction</a>> top_msg_id:flags.1?<a href='/type/int'>int</a> filter:<a href='/type/MessagesFilter'>MessagesFilter</a> min_date:<a href='/type/int'>int</a> max_date:<a href='/type/int'>int</a> offset_id:<a href='/type/int'>int</a> add_offset:<a href='/type/int'>int</a> limit:<a href='/type/int'>int</a> max_id:<a href='/type/int'>int</a> min_id:<a href='/type/int'>int</a> hash:<a href='/type/long'>long</a> = <a href='/type/messages.Messages'>messages.Messages</a>;
|
||||
|
||||
<a href='/method/messages.getDefaultTagReactions'>messages.getDefaultTagReactions</a>#bdf93428 hash:<a href='/type/long'>long</a> = <a href='/type/messages.Reactions'>messages.Reactions</a>;
|
||||
|
||||
<a href='/method/messages.updateSavedReactionTag'>messages.updateSavedReactionTag</a>#60297dec flags:<a href='/type/%23'>#</a> reaction:<a href='/type/Reaction'>Reaction</a> title:flags.0?<a href='/type/string'>string</a> = <a href='/type/Bool'>Bool</a>;
|
||||
<a href='/method/messages.getSavedReactionTags'>messages.getSavedReactionTags</a>#761ddacf hash:<a href='/type/long'>long</a> = <a href='/type/messages.SavedReactionTags'>messages.SavedReactionTags</a>;</code></pre>
|
||||
<p>Tags are based on <a href="/api/reactions">reactions »</a>: adding a tag to a saved message is as easy as <a href="/api/reactions">reacting to it »</a> using <a href="/method/messages.sendReaction">messages.sendReaction</a>. </p>
|
||||
<p>Reactions are considered as tags only for saved messages, if the following conditions are met:</p>
|
||||
<ul>
|
||||
<li>The saved message did not previously have any reaction,</li>
|
||||
<li>OR if the saved message already has some reactions <em>and</em> the <a href="/constructor/messageReactions">messageReactions</a>.<code>reactions_as_tags</code> flag is set.<br>
|
||||
If the <code>reactions_as_tags</code> flag is not set on a saved message with at least one reaction, the reaction was added before tags were introduced (before layer 171). In this case, to enable adding reaction tags, the user must first remove all existing reactions on the message, and then re-add the appropriate reaction tags. </li>
|
||||
</ul>
|
||||
<p>You may search for saved messages tagged with one or more reactions using the <code>saved_reaction</code> parameter of <a href="/method/messages.search">messages.search</a>. </p>
|
||||
<p><a href="/method/messages.getDefaultTagReactions">messages.getDefaultTagReactions</a> can be used to fetch a default recommended list of tag reactions. </p>
|
||||
<p><a href="/api/premium">Premium</a> users may use any reaction as a tag; non-<a href="/api/premium">Premium</a> users may only use the reactions returned by <a href="/method/messages.getDefaultTagReactions">messages.getDefaultTagReactions</a>. </p>
|
||||
<p>The user may also assign a name (max 12 UTF-8 chars) to a tag reaction using <a href="/method/messages.updateSavedReactionTag">messages.updateSavedReactionTag</a>; to remove the name, call the same method without setting the <code>title</code> flag. </p>
|
||||
<p><a href="/method/messages.getSavedReactionTags">messages.getSavedReactionTags</a> can be used to fetch and locally cache the full list of reaction tag names assigned by the user.<br>
|
||||
Updating the name of a reaction tag will emit an <a href="/constructor/updateSavedReactionTags">updateSavedReactionTags</a> update to all logged-in sessions except for the current one; this update should trigger a call to <a href="/method/messages.getSavedReactionTags">messages.getSavedReactionTags</a> to refresh the locally cached list. </p>
|
||||
<p>If non-empty, the list of saved reaction tags returned by <a href="/method/messages.getSavedReactionTags">messages.getSavedReactionTags</a> should be shown in the UI just below the search input bar, in descending order by <code>count</code>. </p>
|
||||
<p>The tag reaction selection UI, on the other hand, should first display the tags returned by <a href="/method/messages.getSavedReactionTags">messages.getSavedReactionTags</a> in descending order by <code>count</code>, then the tags returned by <a href="/method/messages.getDefaultTagReactions">messages.getDefaultTagReactions</a> that weren't already returned by <a href="/method/messages.getSavedReactionTags">messages.getSavedReactionTags</a>, then any installed <a href="/api/custom-emoji">custom emoji packs</a>.</p></div>
|
||||
|
||||
</div>
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue