2022-03-10 21:15:11 +01:00
<!DOCTYPE html>
< html class = "" >
< head >
< meta charset = "utf-8" >
< title > Message reactions< / title >
< meta name = "viewport" content = "width=device-width, initial-scale=1.0" >
< meta property = "description" content = "Telegram allows users to react on any message using specific emojis, triggering cute lottie animations." >
< meta property = "og:title" content = "Message reactions" >
< meta property = "og:image" content = "" >
< meta property = "og:description" content = "Telegram allows users to react on any message using specific emojis, triggering cute lottie animations." >
< link rel = "shortcut icon" href = "/favicon.ico?4" type = "image/x-icon" / >
< link href = "/css/bootstrap.min.css?3" rel = "stylesheet" >
2022-04-18 22:44:16 +02:00
< link href = "/css/telegram.css?226" rel = "stylesheet" media = "screen" >
2022-03-10 21:15:11 +01:00
< 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/reactions" > Message reactions< / a > < / li > < / ul > < / div >
< h1 id = "dev_page_title" > Message reactions< / h1 >
< div id = "dev_page_content" > <!-- scroll_nav -->
< p > Telegram allows users to react on any message using specific emojis, triggering cute lottie animations. < / p >
< h2 > < a class = "anchor" href = "#react-to-a-message" id = "react-to-a-message" name = "react-to-a-message" > < i class = "anchor-icon" > < / i > < / a > React to a message< / h2 >
< pre > < code > < a href = '/constructor/message' > message< / a > #38116ee0 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 > 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/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 > = < a href = '/type/Message' > Message< / a > ;
< a href = '/constructor/updateMessageReactions' > updateMessageReactions< / a > #154798c3 peer:< a href = '/type/Peer' > Peer< / a > msg_id:< a href = '/type/int' > int< / a > reactions:< a href = '/type/MessageReactions' > MessageReactions< / a > = < a href = '/type/Update' > Update< / a > ;
< 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 > 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/reactionCount' > reactionCount< / a > #6fb250d1 flags:< a href = '/type/%23' > #< / a > chosen:flags.0?< a href = '/constructor/true' > true< / a > reaction:< a href = '/type/string' > string< / a > count:< a href = '/type/int' > int< / a > = < a href = '/type/ReactionCount' > ReactionCount< / a > ;
< a href = '/constructor/messagePeerReaction' > messagePeerReaction< / a > #51b67eff flags:< a href = '/type/%23' > #< / a > big:flags.0?< a href = '/constructor/true' > true< / a > unread:flags.1?< a href = '/constructor/true' > true< / a > peer_id:< a href = '/type/Peer' > Peer< / a > reaction:< a href = '/type/string' > string< / a > = < a href = '/type/MessagePeerReaction' > MessagePeerReaction< / a > ;
< a href = '/constructor/messages.messageReactionsList' > messages.messageReactionsList< / a > #31bd492d flags:< a href = '/type/%23' > #< / a > count:< a href = '/type/int' > int< / a > reactions:< a href = '/type/Vector%20t' > Vector< / a > < < a href = '/type/MessagePeerReaction' > MessagePeerReaction< / 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 > > next_offset:flags.0?< a href = '/type/string' > string< / a > = < a href = '/type/messages.MessageReactionsList' > messages.MessageReactionsList< / a > ;
---functions---
< a href = '/method/messages.sendReaction' > messages.sendReaction< / a > #25690ce4 flags:< a href = '/type/%23' > #< / a > big:flags.1?< 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/string' > string< / a > = < a href = '/type/Updates' > Updates< / a > ;
< a href = '/method/messages.getMessagesReactions' > messages.getMessagesReactions< / a > #8bba90e6 peer:< a href = '/type/InputPeer' > InputPeer< / a > id:< a href = '/type/Vector%20t' > Vector< / a > < < a href = '/type/int' > int< / a > > = < a href = '/type/Updates' > Updates< / a > ;
< a href = '/method/messages.getMessageReactionsList' > messages.getMessageReactionsList< / a > #e0ee6b77 flags:< a href = '/type/%23' > #< / a > peer:< a href = '/type/InputPeer' > InputPeer< / a > id:< a href = '/type/int' > int< / a > reaction:flags.0?< a href = '/type/string' > string< / a > offset:flags.1?< a href = '/type/string' > string< / a > limit:< a href = '/type/int' > int< / a > = < a href = '/type/messages.MessageReactionsList' > messages.MessageReactionsList< / a > ;
< a href = '/method/messages.getUnreadReactions' > messages.getUnreadReactions< / a > #e85bae1a peer:< a href = '/type/InputPeer' > InputPeer< / 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 > = < a href = '/type/messages.Messages' > messages.Messages< / a > ;
< a href = '/method/messages.readReactions' > messages.readReactions< / a > #82e251d7 peer:< a href = '/type/InputPeer' > InputPeer< / a > = < a href = '/type/messages.AffectedHistory' > messages.AffectedHistory< / a > ;< / code > < / pre >
< p > Users can react to a message using < a href = "/method/messages.sendReaction" > messages.sendReaction< / a > : the < code > big< / code > flag can be optionally set to elicit a bigger reaction.< br >
Message authors will receive an < a href = "/constructor/updateMessageReactions" > updateMessageReactions< / a > update when a user reacts to their message. < / p >
< p > < a href = "/method/messages.getMessagesReactions" > messages.getMessagesReactions< / a > can be used to fetch a full list of reactions for one or more messages.< br >
Apps should short-poll reactions for visible messages (that weren't sent by the user) once every 15-30 seconds, but only if < code > message.reactions< / code > is set. < / p >
< p > In groups, < a href = "/method/messages.getMessageReactionsList" > messages.getMessageReactionsList< / a > can be used to fetch the reaction list, along with the sender of each reaction. < / 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 >
< h2 > < a class = "anchor" href = "#fetch-globally-available-reactions" id = "fetch-globally-available-reactions" name = "fetch-globally-available-reactions" > < i class = "anchor-icon" > < / i > < / a > Fetch globally available reactions< / h2 >
< pre > < code > < a href = '/constructor/availableReaction' > availableReaction< / a > #c077ec01 flags:< a href = '/type/%23' > #< / a > inactive:flags.0?< a href = '/constructor/true' > true< / a > reaction:< a href = '/type/string' > string< / a > title:< a href = '/type/string' > string< / a > static_icon:< a href = '/type/Document' > Document< / a > appear_animation:< a href = '/type/Document' > Document< / a > select_animation:< a href = '/type/Document' > Document< / a > activate_animation:< a href = '/type/Document' > Document< / a > effect_animation:< a href = '/type/Document' > Document< / a > around_animation:flags.1?< a href = '/type/Document' > Document< / a > center_icon:flags.1?< a href = '/type/Document' > Document< / a > = < a href = '/type/AvailableReaction' > AvailableReaction< / a > ;
< a href = '/constructor/messages.availableReactionsNotModified' > messages.availableReactionsNotModified< / a > #9f071957 = < a href = '/type/messages.AvailableReactions' > messages.AvailableReactions< / a > ;
< a href = '/constructor/messages.availableReactions' > messages.availableReactions< / a > #768e3aad hash:< a href = '/type/int' > int< / a > reactions:< a href = '/type/Vector%20t' > Vector< / a > < < a href = '/type/AvailableReaction' > AvailableReaction< / a > > = < a href = '/type/messages.AvailableReactions' > messages.AvailableReactions< / a > ;
---functions---
< a href = '/method/messages.getAvailableReactions' > messages.getAvailableReactions< / a > #18dea0ac hash:< a href = '/type/int' > int< / a > = < a href = '/type/messages.AvailableReactions' > messages.AvailableReactions< / a > ;< / code > < / pre >
< p > < a href = "/method/messages.getAvailableReactions" > messages.getAvailableReactions< / a > can be used to fetch the full list of reactions that can be used on Telegram.< br >
The returned vector of < a href = "/constructor/availableReaction" > availableReaction< / a > contains multiple fields with lottie animated stickers and simple images that should be positioned, displayed and played appropriately in the UI, as described in the < a href = "/constructor/availableReaction" > constructor page »< / a > . < / p >
< h2 > < a class = "anchor" href = "#set-default-reaction" id = "set-default-reaction" name = "set-default-reaction" > < i class = "anchor-icon" > < / i > < / a > Set default reaction< / h2 >
< pre > < code > < a href = '/constructor/jsonString' > jsonString< / a > #b71e767a value:< a href = '/type/string' > string< / a > = < a href = '/type/JSONValue' > JSONValue< / a > ;
< 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/jsonObject' > jsonObject< / a > #99c1d49d value:< a href = '/type/Vector%20t' > Vector< / a > < < a href = '/type/JSONObjectValue' > JSONObjectValue< / a > > = < a href = '/type/JSONValue' > JSONValue< / a > ;
---functions---
< a href = '/method/messages.setDefaultReaction' > messages.setDefaultReaction< / a > #d960c4d4 reaction:< a href = '/type/string' > string< / a > = < a href = '/type/Bool' > Bool< / a > ;
< a href = '/method/help.getAppConfig' > help.getAppConfig< / a > #98914110 = < a href = '/type/JSONValue' > JSONValue< / a > ;< / code > < / pre >
< p > < a href = "/method/messages.setDefaultReaction" > messages.setDefaultReaction< / a > can be used to change the default emoji reaction to use in the quick reaction menu.< br >
This value is synced across devices and can be fetched using < a href = "/api/config#client-configuration" > help.getAppConfig, < code > reactions_default< / code > field< / a > .< / p >
< h2 > < a class = "anchor" href = "#change-available-reactions-in-group-or-channel" id = "change-available-reactions-in-group-or-channel" name = "change-available-reactions-in-group-or-channel" > < i class = "anchor-icon" > < / i > < / a > Change available reactions in group or channel< / h2 >
< pre > < code > < a href = '/constructor/channelAdminLogEventActionChangeAvailableReactions' > channelAdminLogEventActionChangeAvailableReactions< / a > #9cf7f76a prev_value:< a href = '/type/Vector%20t' > Vector< / a > < < a href = '/type/string' > string< / a > > new_value:< a href = '/type/Vector%20t' > Vector< / a > < < a href = '/type/string' > string< / a > > = < a href = '/type/ChannelAdminLogEventAction' > ChannelAdminLogEventAction< / a > ;
---functions---
< a href = '/method/messages.setChatAvailableReactions' > messages.setChatAvailableReactions< / a > #14050ea6 peer:< a href = '/type/InputPeer' > InputPeer< / a > available_reactions:< a href = '/type/Vector%20t' > Vector< / a > < < a href = '/type/string' > string< / a > > = < a href = '/type/Updates' > Updates< / a > ;< / code > < / pre >
< p > < a href = "/method/messages.getUnreadReactions" > messages.getUnreadReactions< / a > can be used to < / p >
< p > Chat and channel administrators can use < a href = "/method/messages.setChatAvailableReactions" > messages.setChatAvailableReactions< / a > to restrict the set of reactions that can be used in the chat or channel. < / 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 >
2022-04-15 15:43:57 +02:00
< script src = "/js/main.js?45" > < / script >
2022-03-10 21:15:11 +01:00
< script src = "/js/jquery.min.js?1" > < / script >
< script src = "/js/bootstrap.min.js?1" > < / script >
< script > w i n d o w . i n i t D e v P a g e N a v & & i n i t D e v P a g e N a v ( ) ;
backToTopInit("Go up");
removePreloadInit();
< / script >
< / body >
< / html >