2022-02-23 16:30:26 +01:00
<!DOCTYPE html>
< html class = "" >
< head >
< meta charset = "utf-8" >
< title > Threads< / title >
< meta name = "viewport" content = "width=device-width, initial-scale=1.0" >
2022-11-15 01:03:58 +01:00
< meta property = "description" content = "Telegram allows commenting on a channel post or on a generic supergroup message, thanks to message threads." >
2022-02-23 16:30:26 +01:00
< meta property = "og:title" content = "Threads" >
< meta property = "og:image" content = "" >
2022-11-15 01:03:58 +01:00
< meta property = "og:description" content = "Telegram allows commenting on a channel post or on a generic supergroup message, thanks to message threads." >
2022-04-21 15:52:36 +02:00
< 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" / >
2022-02-23 16:30:26 +01:00
< link href = "/css/bootstrap.min.css?3" rel = "stylesheet" >
2023-03-20 12:08:32 +01:00
< link href = "/css/telegram.css?236" rel = "stylesheet" media = "screen" >
2022-02-23 16:30:26 +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/threads" > Threads< / a > < / li > < / ul > < / div >
< h1 id = "dev_page_title" > Threads< / h1 >
< div id = "dev_page_content" > <!-- scroll_nav -->
< p > Telegram allows commenting on a < a href = "/api/channel" > channel post< / a > or on a generic < a href = "/api/channel" > supergroup message< / a > , thanks to message threads.< / p >
< h3 > < a class = "anchor" href = "#message-threads" id = "message-threads" name = "message-threads" > < i class = "anchor-icon" > < / i > < / a > Message threads< / h3 >
< p > Schema:< / p >
2024-02-10 15:32:37 +01:00
< pre > < code > < a href = '/constructor/messageReplyHeader' > messageReplyHeader< / a > #afbc09db flags:< a href = '/type/%23' > #< / a > reply_to_scheduled:flags.2?< a href = '/constructor/true' > true< / a > forum_topic:flags.3?< a href = '/constructor/true' > true< / a > quote:flags.9?< a href = '/constructor/true' > true< / a > reply_to_msg_id:flags.4?< a href = '/type/int' > int< / a > reply_to_peer_id:flags.0?< a href = '/type/Peer' > Peer< / a > reply_from:flags.5?< a href = '/type/MessageFwdHeader' > MessageFwdHeader< / a > reply_media:flags.8?< a href = '/type/MessageMedia' > MessageMedia< / a > reply_to_top_id:flags.1?< a href = '/type/int' > int< / a > quote_text:flags.6?< a href = '/type/string' > string< / a > quote_entities:flags.7?< a href = '/type/Vector%20t' > Vector< / a > < < a href = '/type/MessageEntity' > MessageEntity< / a > > quote_offset:flags.10?< a href = '/type/int' > int< / a > = < a href = '/type/MessageReplyHeader' > MessageReplyHeader< / a > ;
2022-02-23 16:30:26 +01:00
< a href = '/constructor/messageReplies' > messageReplies< / a > #83d60fc2 flags:< a href = '/type/%23' > #< / a > comments:flags.0?< a href = '/constructor/true' > true< / a > replies:< a href = '/type/int' > int< / a > replies_pts:< a href = '/type/int' > int< / a > recent_repliers:flags.1?< a href = '/type/Vector%20t' > Vector< / a > < < a href = '/type/Peer' > Peer< / a > > channel_id:flags.0?< a href = '/type/long' > long< / a > max_id:flags.2?< a href = '/type/int' > int< / a > read_max_id:flags.3?< a href = '/type/int' > int< / a > = < a href = '/type/MessageReplies' > MessageReplies< / a > ;
2024-02-10 15:32:37 +01:00
< a href = '/constructor/message' > message< / a > #76bec211 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 > 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 > 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 > 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 > ;
2022-02-23 16:30:26 +01:00
---functions---
2024-02-10 15:32:37 +01:00
< a href = '/method/messages.search' > messages.search< / a > #a7b4e929 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 > 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 > ;< / code > < / pre >
2022-02-23 16:30:26 +01:00
< p > Threads are usually automatically created when replying to any message in a group.< br >
For example, all replies to a message with ID < code > 420< / code > are associated to thread with ID < code > 420< / code > , unique to this group; this thread ID is contained in the < code > reply_to_top_id< / code > field of < code > reply_to< / code > < a href = "/constructor/messageReplyHeader" > messageReplyHeader< / a > , along with an eventual < code > reply_to_msg_id< / code > , for replies to messages within a thread.< br >
Replies to messages in a thread are part of the same thread, and do not spawn new threads. < / p >
< p > When receiving a < a href = "/constructor/message" > message< / a > from a group that is also the top of a thread (the message with ID < code > 420< / code > ), the < code > replies< / code > optional field will contain a < a href = "/constructor/messageReplies" > messageReplies< / a > constructor, containing the message ID and < a href = "/api/updates" > PTS< / a > of the latest reply in the thread, and the message ID of the latest read thread reply, along with the total number of replies in the thread. < / p >
< p > Replies to a thread can also be manually fetched using < a href = "/method/messages.search" > messages.search< / a > , providing to < code > top_msg_id< / code > the thread ID. < / p >
< h3 > < a class = "anchor" href = "#channel-comments" id = "channel-comments" name = "channel-comments" > < i class = "anchor-icon" > < / i > < / a > Channel comments< / h3 >
2024-02-10 15:32:37 +01:00
< p > The same < a href = "/constructor/messageReplies" > messageReplies< / a > constructor seen above will also be contained in channel posts, this time containing information about the comment section of a specific channel post, see < a href = "/api/discussion" > here »< / a > for more info.< / p > < / div >
2022-02-23 16:30:26 +01:00
< / 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 >
2022-09-09 12:10:24 +02:00
< li > < a href = "//telegram.org/privacy" > Privacy< / a > < / li >
2022-09-09 23:58:59 +02:00
< li > < a href = "//telegram.org/press" > Press< / a > < / li >
2022-02-23 16:30:26 +01:00
< / 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 >
2022-09-09 23:58:59 +02:00
< li > < a href = "//telegram.org/android" > Android< / a > < / li >
< li > < a href = "//telegram.org/dl/web" > Mobile Web< / a > < / li >
2022-02-23 16:30:26 +01:00
< / 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" >
2024-02-15 10:52:23 +01:00
< h5 > < a href = "https://twitter.com/telegram" target = "_blank" data-track = "Follow/Twitter" onclick = "trackDlClick(this, event)" > Twitter< / a > < / h5 >
2022-02-23 16:30:26 +01:00
< / div >
< / div >
< / div >
< / div >
2022-12-10 23:50:15 +01:00
< script src = "/js/main.js?47" > < / script >
2022-02-23 16:30:26 +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 >