Message reactions

Telegram allows users to react on any message using specific emojis, triggering cute lottie animations.

React to a message

message#38116ee0 flags:# out:flags.1?true mentioned:flags.4?true media_unread:flags.5?true silent:flags.13?true post:flags.14?true from_scheduled:flags.18?true legacy:flags.19?true edit_hide:flags.21?true pinned:flags.24?true noforwards:flags.26?true id:int from_id:flags.8?Peer peer_id:Peer fwd_from:flags.2?MessageFwdHeader via_bot_id:flags.11?long reply_to:flags.3?MessageReplyHeader date:int message:string media:flags.9?MessageMedia reply_markup:flags.6?ReplyMarkup entities:flags.7?Vector<MessageEntity> views:flags.10?int forwards:flags.10?int replies:flags.23?MessageReplies edit_date:flags.15?int post_author:flags.16?string grouped_id:flags.17?long reactions:flags.20?MessageReactions restriction_reason:flags.22?Vector<RestrictionReason> ttl_period:flags.25?int = Message;

updateMessageReactions#154798c3 peer:Peer msg_id:int reactions:MessageReactions = Update;

messageReactions#4f2b9479 flags:# min:flags.0?true can_see_list:flags.2?true results:Vector<ReactionCount> recent_reactions:flags.1?Vector<MessagePeerReaction> = MessageReactions;

reactionCount#6fb250d1 flags:# chosen:flags.0?true reaction:string count:int = ReactionCount;

messagePeerReaction#51b67eff flags:# big:flags.0?true unread:flags.1?true peer_id:Peer reaction:string = MessagePeerReaction;

messages.messageReactionsList#31bd492d flags:# count:int reactions:Vector<MessagePeerReaction> chats:Vector<Chat> users:Vector<User> next_offset:flags.0?string = messages.MessageReactionsList;

---functions---

messages.sendReaction#25690ce4 flags:# big:flags.1?true peer:InputPeer msg_id:int reaction:flags.0?string = Updates;
messages.getMessagesReactions#8bba90e6 peer:InputPeer id:Vector<int> = Updates;
messages.getMessageReactionsList#e0ee6b77 flags:# peer:InputPeer id:int reaction:flags.0?string offset:flags.1?string limit:int = messages.MessageReactionsList;

messages.getUnreadReactions#e85bae1a peer:InputPeer offset_id:int add_offset:int limit:int max_id:int min_id:int = messages.Messages;
messages.readReactions#82e251d7 peer:InputPeer = messages.AffectedHistory;

Users can react to a message using messages.sendReaction: the big flag can be optionally set to elicit a bigger reaction.
Message authors will receive an updateMessageReactions update when a user reacts to their message.

messages.getMessagesReactions can be used to fetch a full list of reactions for one or more messages.
Apps should short-poll reactions for visible messages (that weren't sent by the user) once every 15-30 seconds, but only if message.reactions is set.

In groups, messages.getMessageReactionsList can be used to fetch the reaction list, along with the sender of each reaction.

messages.getUnreadReactions is used to fetch messages with unread reactions.
Use messages.readReactions to mark all reactions as read in a certain chat.

Fetch globally available reactions

availableReaction#c077ec01 flags:# inactive:flags.0?true reaction:string title:string static_icon:Document appear_animation:Document select_animation:Document activate_animation:Document effect_animation:Document around_animation:flags.1?Document center_icon:flags.1?Document = AvailableReaction;

messages.availableReactionsNotModified#9f071957 = messages.AvailableReactions;
messages.availableReactions#768e3aad hash:int reactions:Vector<AvailableReaction> = messages.AvailableReactions;

---functions---

messages.getAvailableReactions#18dea0ac hash:int = messages.AvailableReactions;

messages.getAvailableReactions can be used to fetch the full list of reactions that can be used on Telegram.
The returned vector of availableReaction 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 constructor page ».

Set default reaction

jsonString#b71e767a value:string = JSONValue;
jsonObjectValue#c0de1bd9 key:string value:JSONValue = JSONObjectValue;
jsonObject#99c1d49d value:Vector<JSONObjectValue> = JSONValue;

---functions---

messages.setDefaultReaction#d960c4d4 reaction:string = Bool;

help.getAppConfig#98914110 = JSONValue;

messages.setDefaultReaction can be used to change the default emoji reaction to use in the quick reaction menu.
This value is synced across devices and can be fetched using help.getAppConfig, reactions_default field.

Change available reactions in group or channel

channelAdminLogEventActionChangeAvailableReactions#9cf7f76a prev_value:Vector<string> new_value:Vector<string> = ChannelAdminLogEventAction;

---functions---

messages.setChatAvailableReactions#14050ea6 peer:InputPeer available_reactions:Vector<string> = Updates;

messages.getUnreadReactions can be used to

Chat and channel administrators can use messages.setChatAvailableReactions to restrict the set of reactions that can be used in the chat or channel.

Ir arriba