mirror of
https://github.com/MarshalX/telegram-crawler.git
synced 2024-12-13 02:11:00 +01:00
242 lines
27 KiB
HTML
242 lines
27 KiB
HTML
<!DOCTYPE html>
|
||
<html class="">
|
||
<head>
|
||
<meta charset="utf-8">
|
||
<title>Saved messages</title>
|
||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||
<meta property="description" content="The Saved Messages chat allows users to bookmark messages and media: it's a personal cloud storage for any messages or media you may want to send or forward there.">
|
||
<meta property="og:title" content="Saved messages">
|
||
<meta property="og:image" content="">
|
||
<meta property="og:description" content="The Saved Messages chat allows users to bookmark messages and media: it's a personal cloud storage for any messages or media you may want to send or forward there.">
|
||
<link rel="icon" type="image/svg+xml" href="/img/website_icon.svg?4">
|
||
<link rel="apple-touch-icon" sizes="180x180" href="/img/apple-touch-icon.png">
|
||
<link rel="icon" type="image/png" sizes="32x32" href="/img/favicon-32x32.png">
|
||
<link rel="icon" type="image/png" sizes="16x16" href="/img/favicon-16x16.png">
|
||
<link rel="alternate icon" href="/img/favicon.ico" type="image/x-icon" />
|
||
<link href="/css/bootstrap.min.css?3" rel="stylesheet">
|
||
|
||
<link href="/css/telegram.css?241" 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/saved-messages" >Saved messages</a></li></ul></div>
|
||
<h1 id="dev_page_title">Saved messages</h1>
|
||
|
||
<div id="dev_page_content"><!-- scroll_nav -->
|
||
|
||
<p>The Saved Messages chat allows users to bookmark messages and media: it's a personal cloud storage for any messages or media you may want to send or forward there. </p>
|
||
<p>Internally, the Saved Messages chat is simply the private chat with ourselves (i.e. the chat with <a href="/constructor/inputPeerSelf">inputPeerSelf</a>): the only difference between the Saved Messages chat and a chat with any other user, is that additional features are available to better organize messages and media sent to it. </p>
|
||
<h3><a class="anchor" href="#saved-message-dialogs" id="saved-message-dialogs" name="saved-message-dialogs"><i class="anchor-icon"></i></a>Saved message dialogs</h3>
|
||
<p>Schema:</p>
|
||
<pre><code><a href='/constructor/message'>message</a>#94345242 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> noforwards:flags.26?<a href='/constructor/true'>true</a> invert_media:flags.27?<a href='/constructor/true'>true</a> flags2:<a href='/type/%23'>#</a> offline:flags2.1?<a href='/constructor/true'>true</a> id:<a href='/type/int'>int</a> from_id:flags.8?<a href='/type/Peer'>Peer</a> from_boosts_applied:flags.29?<a href='/type/int'>int</a> peer_id:<a href='/type/Peer'>Peer</a> saved_peer_id:flags.28?<a href='/type/Peer'>Peer</a> fwd_from:flags.2?<a href='/type/MessageFwdHeader'>MessageFwdHeader</a> via_bot_id:flags.11?<a href='/type/long'>long</a> via_business_bot_id:flags2.0?<a href='/type/long'>long</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><<a href='/type/MessageEntity'>MessageEntity</a>> 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> reactions:flags.20?<a href='/type/MessageReactions'>MessageReactions</a> restriction_reason:flags.22?<a href='/type/Vector%20t'>Vector</a><<a href='/type/RestrictionReason'>RestrictionReason</a>> ttl_period:flags.25?<a href='/type/int'>int</a> quick_reply_shortcut_id:flags.30?<a href='/type/int'>int</a> effect:flags2.2?<a href='/type/long'>long</a> factcheck:flags2.3?<a href='/type/FactCheck'>FactCheck</a> = <a href='/type/Message'>Message</a>;
|
||
<a href='/constructor/messageFwdHeader'>messageFwdHeader</a>#4e4df4bb flags:<a href='/type/%23'>#</a> imported:flags.7?<a href='/constructor/true'>true</a> saved_out:flags.11?<a href='/constructor/true'>true</a> from_id:flags.0?<a href='/type/Peer'>Peer</a> from_name:flags.5?<a href='/type/string'>string</a> date:<a href='/type/int'>int</a> channel_post:flags.2?<a href='/type/int'>int</a> post_author:flags.3?<a href='/type/string'>string</a> saved_from_peer:flags.4?<a href='/type/Peer'>Peer</a> saved_from_msg_id:flags.4?<a href='/type/int'>int</a> saved_from_id:flags.8?<a href='/type/Peer'>Peer</a> saved_from_name:flags.9?<a href='/type/string'>string</a> saved_date:flags.10?<a href='/type/int'>int</a> psa_type:flags.6?<a href='/type/string'>string</a> = <a href='/type/MessageFwdHeader'>MessageFwdHeader</a>;
|
||
|
||
<a href='/constructor/savedDialog'>savedDialog</a>#bd87cb6c flags:<a href='/type/%23'>#</a> pinned:flags.2?<a href='/constructor/true'>true</a> peer:<a href='/type/Peer'>Peer</a> top_message:<a href='/type/int'>int</a> = <a href='/type/SavedDialog'>SavedDialog</a>;
|
||
|
||
<a href='/constructor/updateSavedDialogPinned'>updateSavedDialogPinned</a>#aeaf9e74 flags:<a href='/type/%23'>#</a> pinned:flags.0?<a href='/constructor/true'>true</a> peer:<a href='/type/DialogPeer'>DialogPeer</a> = <a href='/type/Update'>Update</a>;
|
||
<a href='/constructor/updatePinnedSavedDialogs'>updatePinnedSavedDialogs</a>#686c85a6 flags:<a href='/type/%23'>#</a> order:flags.0?<a href='/type/Vector%20t'>Vector</a><<a href='/type/DialogPeer'>DialogPeer</a>> = <a href='/type/Update'>Update</a>;
|
||
|
||
<a href='/constructor/messages.savedDialogs'>messages.savedDialogs</a>#f83ae221 dialogs:<a href='/type/Vector%20t'>Vector</a><<a href='/type/SavedDialog'>SavedDialog</a>> messages:<a href='/type/Vector%20t'>Vector</a><<a href='/type/Message'>Message</a>> chats:<a href='/type/Vector%20t'>Vector</a><<a href='/type/Chat'>Chat</a>> users:<a href='/type/Vector%20t'>Vector</a><<a href='/type/User'>User</a>> = <a href='/type/messages.SavedDialogs'>messages.SavedDialogs</a>;
|
||
<a href='/constructor/messages.savedDialogsSlice'>messages.savedDialogsSlice</a>#44ba9dd9 count:<a href='/type/int'>int</a> dialogs:<a href='/type/Vector%20t'>Vector</a><<a href='/type/SavedDialog'>SavedDialog</a>> messages:<a href='/type/Vector%20t'>Vector</a><<a href='/type/Message'>Message</a>> chats:<a href='/type/Vector%20t'>Vector</a><<a href='/type/Chat'>Chat</a>> users:<a href='/type/Vector%20t'>Vector</a><<a href='/type/User'>User</a>> = <a href='/type/messages.SavedDialogs'>messages.SavedDialogs</a>;
|
||
<a href='/constructor/messages.savedDialogsNotModified'>messages.savedDialogsNotModified</a>#c01f6fe8 count:<a href='/type/int'>int</a> = <a href='/type/messages.SavedDialogs'>messages.SavedDialogs</a>;
|
||
|
||
<a href='/constructor/savedDialog'>savedDialog</a>#bd87cb6c flags:<a href='/type/%23'>#</a> pinned:flags.2?<a href='/constructor/true'>true</a> peer:<a href='/type/Peer'>Peer</a> top_message:<a href='/type/int'>int</a> = <a href='/type/SavedDialog'>SavedDialog</a>;
|
||
|
||
---functions---
|
||
|
||
<a href='/method/messages.getSavedDialogs'>messages.getSavedDialogs</a>#5381d21a flags:<a href='/type/%23'>#</a> exclude_pinned:flags.0?<a href='/constructor/true'>true</a> offset_date:<a href='/type/int'>int</a> offset_id:<a href='/type/int'>int</a> offset_peer:<a href='/type/InputPeer'>InputPeer</a> limit:<a href='/type/int'>int</a> hash:<a href='/type/long'>long</a> = <a href='/type/messages.SavedDialogs'>messages.SavedDialogs</a>;
|
||
<a href='/method/messages.getSavedHistory'>messages.getSavedHistory</a>#3d9a414d peer:<a href='/type/InputPeer'>InputPeer</a> offset_id:<a href='/type/int'>int</a> offset_date:<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.deleteSavedHistory'>messages.deleteSavedHistory</a>#6e98102b flags:<a href='/type/%23'>#</a> peer:<a href='/type/InputPeer'>InputPeer</a> max_id:<a href='/type/int'>int</a> min_date:flags.2?<a href='/type/int'>int</a> max_date:flags.3?<a href='/type/int'>int</a> = <a href='/type/messages.AffectedHistory'>messages.AffectedHistory</a>;
|
||
<a href='/method/messages.getPinnedSavedDialogs'>messages.getPinnedSavedDialogs</a>#d63d94e0 = <a href='/type/messages.SavedDialogs'>messages.SavedDialogs</a>;
|
||
<a href='/method/messages.toggleSavedDialogPin'>messages.toggleSavedDialogPin</a>#ac81bbde flags:<a href='/type/%23'>#</a> pinned:flags.0?<a href='/constructor/true'>true</a> peer:<a href='/type/InputDialogPeer'>InputDialogPeer</a> = <a href='/type/Bool'>Bool</a>;
|
||
<a href='/method/messages.reorderPinnedSavedDialogs'>messages.reorderPinnedSavedDialogs</a>#8b716587 flags:<a href='/type/%23'>#</a> force:flags.0?<a href='/constructor/true'>true</a> order:<a href='/type/Vector%20t'>Vector</a><<a href='/type/InputDialogPeer'>InputDialogPeer</a>> = <a href='/type/Bool'>Bool</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.getSearchCounters'>messages.getSearchCounters</a>#1bbcf300 flags:<a href='/type/%23'>#</a> peer:<a href='/type/InputPeer'>InputPeer</a> saved_peer_id:flags.2?<a href='/type/InputPeer'>InputPeer</a> top_msg_id:flags.0?<a href='/type/int'>int</a> filters:<a href='/type/Vector%20t'>Vector</a><<a href='/type/MessagesFilter'>MessagesFilter</a>> = <a href='/type/Vector%20t'>Vector</a><<a href='/type/messages.SearchCounter'>messages.SearchCounter</a>>;
|
||
<a href='/method/messages.getSearchResultsCalendar'>messages.getSearchResultsCalendar</a>#6aa3f6bd flags:<a href='/type/%23'>#</a> peer:<a href='/type/InputPeer'>InputPeer</a> saved_peer_id:flags.2?<a href='/type/InputPeer'>InputPeer</a> filter:<a href='/type/MessagesFilter'>MessagesFilter</a> offset_id:<a href='/type/int'>int</a> offset_date:<a href='/type/int'>int</a> = <a href='/type/messages.SearchResultsCalendar'>messages.SearchResultsCalendar</a>;
|
||
<a href='/method/messages.getSearchResultsPositions'>messages.getSearchResultsPositions</a>#9c7f2f10 flags:<a href='/type/%23'>#</a> peer:<a href='/type/InputPeer'>InputPeer</a> saved_peer_id:flags.2?<a href='/type/InputPeer'>InputPeer</a> filter:<a href='/type/MessagesFilter'>MessagesFilter</a> offset_id:<a href='/type/int'>int</a> limit:<a href='/type/int'>int</a> = <a href='/type/messages.SearchResultsPositions'>messages.SearchResultsPositions</a>;</code></pre>
|
||
<p>Messages sent and forwarded from various users (including ourselves) to Saved Messages are automatically categorized by their original dialog into a saved dialog list, quite similar to the normal dialog list used to normally interact with chats. </p>
|
||
<p>To add new dialogs to the normal dialog list a user has to write to them (or join a channel/chat, etc.).<br>
|
||
To add new dialogs to the saved dialog list, simply forward messages from any normal dialog to <a href="/constructor/inputPeerSelf">inputPeerSelf</a> (the current user): the forwarded messages (including outgoing ones) will be added to a saved dialog with the same ID of the original dialog.</p>
|
||
<p>This includes outgoing messages, for example assume the following:</p>
|
||
<ul>
|
||
<li>Our user <code>id</code> is equal to <code>11111111</code></li>
|
||
<li>We send a message A with ID <code>10</code> to a <a href="/api/channel">supergroup</a> with <code>id=-100122222222</code> (bot API format, equivalent to a <a href="/constructor/peerChannel">peerChannel</a> with ID <code>122222222</code>) </li>
|
||
<li>Another user with <code>id=133333333</code> replies <code>B</code> to our previous message, message ID <code>11</code></li>
|
||
<li>We forward both messages <code>A</code> and <code>B</code> with IDs <code>10</code> and <code>11</code> to <a href="/constructor/inputPeerSelf">inputPeerSelf</a>, which will:<ul>
|
||
<li>Create a new <a href="/constructor/savedDialog">savedDialog</a> with <code>peer=-100122222222</code> (if it doesn't exist already because we already forwarded messages from that supergroup)</li>
|
||
<li>Generate two messages:<ul>
|
||
<li>Message <code>A</code>:<ul>
|
||
<li><code>id</code>: an unrelated message ID, the next one in the common ID sequence, for example <code>1234</code></li>
|
||
<li><code>peer_id</code>: <code>11111111</code></li>
|
||
<li><code>saved_peer_id</code>: <code>-100122222222</code></li>
|
||
<li><code>fwd_from.from_id</code>: <code>11111111</code></li>
|
||
<li><code>fwd_from.saved_from_peer</code>: <code>-100122222222</code></li>
|
||
<li><code>fwd_from.saved_from_msg_id</code>: <code>10</code></li>
|
||
</ul>
|
||
</li>
|
||
<li>Message <code>B</code>:<ul>
|
||
<li><code>id</code>: an unrelated message ID, the next one in the common ID sequence, for example <code>1235</code></li>
|
||
<li><code>reply_to.reply_to_msg_id</code>: <code>1234</code></li>
|
||
<li><code>peer_id</code>: <code>11111111</code></li>
|
||
<li><code>saved_peer_id</code>: <code>-100122222222</code></li>
|
||
<li><code>fwd_from.from_id</code>: <code>133333333</code></li>
|
||
<li><code>fwd_from.saved_from_peer</code>: <code>-100122222222</code></li>
|
||
<li><code>fwd_from.saved_from_msg_id</code>: <code>11</code></li>
|
||
</ul>
|
||
</li>
|
||
</ul>
|
||
</li>
|
||
</ul>
|
||
</li>
|
||
</ul>
|
||
<p>Saving messages from private chats with users with forward privacy enabled will add them to a saved dialog entry of a special anonymous user with <code>id=2666000</code>. </p>
|
||
<p>Clients may use the following pseudocode to manually populate the <code>saved_peer_id</code> of old <code>layer < 170</code> <a href="/constructor/message">message</a>s stored in the <strong>local</strong> database. </p>
|
||
<pre><code>// user_id is the ID of the current user.
|
||
|
||
if (message.peer_id == user_id) {
|
||
if (message.fwd_from.saved_from_peer) {
|
||
message.saved_peer_id = message.fwd_from.saved_from_peer
|
||
} elseif (message.fwd_from.from_id) {
|
||
message.saved_peer_id = user_id;
|
||
} elseif (message.fwd_from.from_name) {
|
||
message.saved_peer_id = 2666000;
|
||
} else {
|
||
message.saved_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>
|
||
<h3><a class="anchor" href="#tags" id="tags" name="tags"><i class="anchor-icon"></i></a>Tags</h3>
|
||
<p>For even more organization, <a href="/api/premium">Premium users</a> 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>#3637e05b flags:<a href='/type/%23'>#</a> peer:flags.0?<a href='/type/InputPeer'>InputPeer</a> 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>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; a <code>peer</code> may be optionally specified, to fetch only reaction tags used on messages of a specific <a href="#saved-message-dialogs">saved message dialog</a>.<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> <em>without</em> setting the <code>peer</code> flag 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>; if searching within a specific <a href="#saved-message-dialogs">saved message dialog</a>, use <code>peer</code> to only return tags used in a specific saved message dialog. </p>
|
||
<p>The tag reaction selection UI, on the other hand, should first display the reactions returned by <a href="/method/messages.getSavedReactionTags">messages.getSavedReactionTags</a> (global tag list, i.e. without <code>peer</code> regardless of the current saved message dialog) in descending order by <code>count</code>, then the reactions 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>
|
||
|
||
</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/privacy">Privacy</a></li>
|
||
<li><a href="//telegram.org/press">Press</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/android">Android</a></li>
|
||
<li><a href="//telegram.org/dl/web">Mobile Web</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="//telegram.org/press">Press</a></h5>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<script src="/js/main.js?47"></script>
|
||
<script src="/js/jquery.min.js?1"></script>
|
||
<script src="/js/bootstrap.min.js?1"></script>
|
||
|
||
<script>window.initDevPageNav&&initDevPageNav();
|
||
backToTopInit("Go up");
|
||
removePreloadInit();
|
||
</script>
|
||
</body>
|
||
</html>
|
||
|