telegram-crawler/data/web/blogfork.telegram.org/api/discussion.html

225 lines
26 KiB
HTML
Raw Normal View History

2022-05-14 00:37:40 +02:00
<!DOCTYPE html>
<html class="">
<head>
<meta charset="utf-8">
<title>Discussion groups</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
2022-11-15 01:03:58 +01:00
<meta property="description" content="Groups can be associated to a channel as a discussion group, to allow users to discuss about posts.">
2022-05-14 00:37:40 +02:00
<meta property="og:title" content="Discussion groups">
<meta property="og:image" content="">
2022-11-15 01:03:58 +01:00
<meta property="og:description" content="Groups can be associated to a channel as a discussion group, to allow users to discuss about posts.">
2022-05-14 00:37:40 +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" />
<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-05-14 00:37:40 +02: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/discussion" >Discussion groups</a></li></ul></div>
<h1 id="dev_page_title">Discussion groups</h1>
<div id="dev_page_content"><!-- scroll_nav -->
<p><a href="/api/channel">Groups</a> can be associated to a <a href="/api/channel">channel</a> as a <a href="https://telegram.org/blog/privacy-discussions-web-bots">discussion group</a>, to allow users to discuss about posts. </p>
2024-02-10 15:29:33 +01:00
<h3><a class="anchor" href="#channel-comments" id="channel-comments" name="channel-comments"><i class="anchor-icon"></i></a>Channel comments</h3>
2022-05-14 00:37:40 +02:00
<pre><code><a href='/constructor/boolFalse'>boolFalse</a>#bc799737 = <a href='/type/Bool'>Bool</a>;
<a href='/constructor/boolTrue'>boolTrue</a>#997275b5 = <a href='/type/Bool'>Bool</a>;
2024-02-10 15:29:33 +01:00
<a href='/constructor/channelFull'>channelFull</a>#f2bcb6f flags:<a href='/type/%23'>#</a> can_view_participants:flags.3?<a href='/constructor/true'>true</a> can_set_username:flags.6?<a href='/constructor/true'>true</a> can_set_stickers:flags.7?<a href='/constructor/true'>true</a> hidden_prehistory:flags.10?<a href='/constructor/true'>true</a> can_set_location:flags.16?<a href='/constructor/true'>true</a> has_scheduled:flags.19?<a href='/constructor/true'>true</a> can_view_stats:flags.20?<a href='/constructor/true'>true</a> blocked:flags.22?<a href='/constructor/true'>true</a> flags2:<a href='/type/%23'>#</a> can_delete_channel:flags2.0?<a href='/constructor/true'>true</a> antispam:flags2.1?<a href='/constructor/true'>true</a> participants_hidden:flags2.2?<a href='/constructor/true'>true</a> translations_disabled:flags2.3?<a href='/constructor/true'>true</a> stories_pinned_available:flags2.5?<a href='/constructor/true'>true</a> view_forum_as_messages:flags2.6?<a href='/constructor/true'>true</a> id:<a href='/type/long'>long</a> about:<a href='/type/string'>string</a> participants_count:flags.0?<a href='/type/int'>int</a> admins_count:flags.1?<a href='/type/int'>int</a> kicked_count:flags.2?<a href='/type/int'>int</a> banned_count:flags.2?<a href='/type/int'>int</a> online_count:flags.13?<a href='/type/int'>int</a> read_inbox_max_id:<a href='/type/int'>int</a> read_outbox_max_id:<a href='/type/int'>int</a> unread_count:<a href='/type/int'>int</a> chat_photo:<a href='/type/Photo'>Photo</a> notify_settings:<a href='/type/PeerNotifySettings'>PeerNotifySettings</a> exported_invite:flags.23?<a href='/type/ExportedChatInvite'>ExportedChatInvite</a> bot_info:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/BotInfo'>BotInfo</a>&gt; migrated_from_chat_id:flags.4?<a href='/type/long'>long</a> migrated_from_max_id:flags.4?<a href='/type/int'>int</a> pinned_msg_id:flags.5?<a href='/type/int'>int</a> stickerset:flags.8?<a href='/type/StickerSet'>StickerSet</a> available_min_id:flags.9?<a href='/type/int'>int</a> folder_id:flags.11?<a href='/type/int'>int</a> linked_chat_id:flags.14?<a href='/type/long'>long</a> location:flags.15?<a href='/type/ChannelLocation'>ChannelLocation</a> slowmode_seconds:flags.17?<a href='/type/int'>int</a> slowmode_next_send_date:flags.18?<a href='/type/int'>int</a> stats_dc:flags.12?<a href='/type/int'>int</a> pts:<a href='/type/int'>int</a> call:flags.21?<a href='/type/InputGroupCall'>InputGroupCall</a> ttl_period:flags.24?<a href='/type/int'>int</a> pending_suggestions:flags.25?<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/string'>string</a>&gt; groupcall_default_join_as:flags.26?<a href='/type/Peer'>Peer</a> theme_emoticon:flags.27?<a href='/type/string'>string</a> requests_pending:flags.28?<a href='/type/int'>int</a> recent_requesters:flags.28?<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/long'>long</a>&gt; default_send_as:flags.29?<a href='/type/Peer'>Peer</a> available_reactions:flags.30?<a href='/type/ChatReactions'>ChatReactions</a> stories:flags2.4?<a href='/type/PeerStories'>PeerStories</a> wallpaper:flags2.7?<a href='/type/WallPaper'>WallPaper</a> = <a href='/type/ChatFull'>ChatFull</a>;
2022-05-14 00:37:40 +02:00
<a href='/constructor/messages.chats'>messages.chats</a>#64ff9fd5 chats:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/Chat'>Chat</a>&gt; = <a href='/type/messages.Chats'>messages.Chats</a>;
2024-02-10 15:29:33 +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>&lt;<a href='/type/Peer'>Peer</a>&gt; 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>;
<a href='/constructor/messages.discussionMessage'>messages.discussionMessage</a>#a6341782 flags:<a href='/type/%23'>#</a> messages:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/Message'>Message</a>&gt; max_id:flags.0?<a href='/type/int'>int</a> read_inbox_max_id:flags.1?<a href='/type/int'>int</a> read_outbox_max_id:flags.2?<a href='/type/int'>int</a> unread_count:<a href='/type/int'>int</a> chats:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/Chat'>Chat</a>&gt; users:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/User'>User</a>&gt; = <a href='/type/messages.DiscussionMessage'>messages.DiscussionMessage</a>;
2022-05-14 00:37:40 +02:00
---functions---
<a href='/method/channels.setDiscussionGroup'>channels.setDiscussionGroup</a>#40582bb2 broadcast:<a href='/type/InputChannel'>InputChannel</a> group:<a href='/type/InputChannel'>InputChannel</a> = <a href='/type/Bool'>Bool</a>;
2024-02-10 15:29:33 +01:00
<a href='/method/channels.getGroupsForDiscussion'>channels.getGroupsForDiscussion</a>#f5dad378 = <a href='/type/messages.Chats'>messages.Chats</a>;
<a href='/method/messages.getDiscussionMessage'>messages.getDiscussionMessage</a>#446972fd peer:<a href='/type/InputPeer'>InputPeer</a> msg_id:<a href='/type/int'>int</a> = <a href='/type/messages.DiscussionMessage'>messages.DiscussionMessage</a>;</code></pre>
2022-05-14 00:37:40 +02:00
<p>A discussion group can be associated to a channel using <a href="/method/channels.setDiscussionGroup">channels.setDiscussionGroup</a>.<br>
The discussion group can be accessed in the client by clicking on the discuss button of the channel, or by accessing the <a href="/api/threads">comment section</a> of a specific post; the discussion group ID is also present in the <code>linked_chat_id</code> field of the <a href="/constructor/channelFull">channelFull</a> constructor. </p>
2024-02-10 15:29:33 +01:00
<p>All messages sent to the channel will also be forwarded to the linked group (with sender peer <code>from_id</code> equal to the peer of the linked channel); those messages will also be automatically <a href="/api/pin">pinned</a> in the group. </p>
<p>The comment section of a channel post is simply the <a href="/api/threads">message thread</a> of the automatically forwarded channel message in the linked discussion supergroup.<br>
Thus, the comment section of a particular post can be disabled by removing the autoforwarded channel post message from the discussion group. </p>
<p>A <a href="/constructor/messageReplies">messageReplies</a> constructor will be attached the channel post in the original channel, containing information about the comment section, specifically:</p>
<ul>
<li><code>replies.channel_id</code> will contain the ID of the linked discussion supergroup</li>
<li><code>replies.recent_repliers</code> will contain information about the last few comment posters for a specific thread, to show a small list of commenter profile pictures in client previews.</li>
<li><code>replies.replies</code> will contains the total number of replies in the comment section.</li>
<li><code>replies.max_id</code> <em>may</em> contain the ID of the latest message in the comment section, if any.</li>
<li><code>replies.replies_pts</code> <em>may</em> contain the PTS of the autoforwarded channel message that started the comment section.</li>
</ul>
<p>The same <a href="/constructor/messageReplies">messageReplies</a> constructor with the usual flags for a <a href="/api/threads">thread</a> (i.e. without <code>channel_id</code>, <code>recent_replies</code>) will also be present in the message automatically forwarded to the discussion group, as for all group messages that start a <a href="/api/threads">thread</a>. </p>
<p>Use <a href="/method/messages.getDiscussionMessage">messages.getDiscussionMessage</a> to obtain the initial messages of the <a href="/api/threads">message thread</a> of the autoforwaded channel message in the linked discussion supergroup. </p>
<p>The messages are returned in a reverse chronological order (i.e., in order of decreasing message ID); thus the last message returned by the method will be the autoforwarded channel message that started the comment section. </p>
<h4><a class="anchor" href="#replies" id="replies" name="replies"><i class="anchor-icon"></i></a>@replies</h4>
<pre><code><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/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>&lt;<a href='/type/MessageEntity'>MessageEntity</a>&gt; quote_offset:flags.10?<a href='/type/int'>int</a> = <a href='/type/MessageReplyHeader'>MessageReplyHeader</a>;
<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>&lt;<a href='/type/MessageEntity'>MessageEntity</a>&gt; 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>&lt;<a href='/type/RestrictionReason'>RestrictionReason</a>&gt; ttl_period:flags.25?<a href='/type/int'>int</a> = <a href='/type/Message'>Message</a>;
<a href='/constructor/updateNewMessage'>updateNewMessage</a>#1f2b0afd message:<a href='/type/Message'>Message</a> pts:<a href='/type/int'>int</a> pts_count:<a href='/type/int'>int</a> = <a href='/type/Update'>Update</a>;
<a href='/constructor/updateNewChannelMessage'>updateNewChannelMessage</a>#62ba04d9 message:<a href='/type/Message'>Message</a> pts:<a href='/type/int'>int</a> pts_count:<a href='/type/int'>int</a> = <a href='/type/Update'>Update</a>;
---functions---
<a href='/method/contacts.blockFromReplies'>contacts.blockFromReplies</a>#29a8962c flags:<a href='/type/%23'>#</a> delete_message:flags.0?<a href='/constructor/true'>true</a> delete_history:flags.1?<a href='/constructor/true'>true</a> report_spam:flags.2?<a href='/constructor/true'>true</a> msg_id:<a href='/type/int'>int</a> = <a href='/type/Updates'>Updates</a>;
<a href='/method/contacts.resolveUsername'>contacts.resolveUsername</a>#f93ccba3 username:<a href='/type/string'>string</a> = <a href='/type/contacts.ResolvedPeer'>contacts.ResolvedPeer</a>;</code></pre>
<p>Since a user can comment in channel posts without joining the actual <a href="/api/discussion">discussion supergroup</a>, there must be a way for them to receive notifications about replies in comment sections.<br>
For this reason, a special <code>@replies</code> username is provided.
Its ID for main and testing endpoints can be seen in the <a href="https://github.com/tdlib/td/blob/34cf869c02583c23b023f725dca30cd18efc82a3/td/telegram/ContactsManager.cpp#L4418">tdlib sources</a>. </p>
<p>When someone replies to one of our messages in the comment section of a channel post, and the user is not subscribed to the discussion group, the client will receive two updates:</p>
<ul>
<li>An <a href="/constructor/updateNewChannelMessage">updateNewChannelMessage</a> from the discussion group itself, structured just like any other update coming from a subscribed group, with:<ul>
<li><code>id</code> set to the ID of the reply</li>
<li><code>from_id</code> set to the peer that replied to us</li>
<li><code>peer_id</code> set to the peer of the <a href="/api/discussion">discussion group</a></li>
<li><code>reply_to.reply_to_msg_id</code> set to the ID of our message</li>
<li><code>reply_to.reply_to_top_id</code> set to the <a href="/api/threads">thread ID</a>. </li>
</ul>
</li>
<li>An <a href="/constructor/updateNewMessage">updateNewMessage</a><ul>
<li><code>id</code> set to the common ID sequence for users</li>
<li><code>from_id</code> set to the peer of <code>@replies</code></li>
<li><code>peer_id</code> set to our own peer</li>
<li><code>fwd_from.saved_from_msg_id</code> set to the ID of the reply</li>
<li><code>fwd_from.from_id</code> set to the peer that replied to us</li>
<li><code>reply_to.reply_to_peer_id</code> set to the peer of the <a href="/api/discussion">discussion group</a></li>
<li><code>reply_to.reply_to_msg_id</code> set to the ID of our message</li>
<li><code>reply_to.reply_to_top_id</code> set to the <a href="/api/threads">thread ID</a></li>
</ul>
</li>
</ul>
<p>Clients should display messages coming from <code>@replies</code> as a read-only supergroup, with each reply displayed as a separate message from the author of the reply, with a "View in chat" button like for channel comments. </p>
<p><a href="/method/contacts.blockFromReplies">contacts.blockFromReplies</a> may be used to stop getting notifications about thread replies from a certain user in <code>@replies</code>.</p>
2022-05-14 00:37:40 +02:00
<h3><a class="anchor" href="#linking-a-discussion-group" id="linking-a-discussion-group" name="linking-a-discussion-group"><i class="anchor-icon"></i></a>Linking a discussion group</h3>
<p>To obtain a list of admined supergroups that a channel admin can possibly associate to a channel, use <a href="/method/channels.getGroupsForDiscussion">channels.getGroupsForDiscussion</a>.<br>
Returned <a href="/api/channel#basic-groups">basic group chats</a> must be first <a href="/api/channel#migration">upgraded to supergroups</a> before they can be set as a discussion group.<br>
Before linking a supergroup to a channel, access to the supergroup's old messages must also be enabled using <a href="/method/channels.togglePreHistoryHidden">channels.togglePreHistoryHidden</a>. </p>
<p>To set a returned supergroup as a discussion group use <a href="/method/channels.setDiscussionGroup">channels.setDiscussionGroup</a>.</p>
<p>Schema: </p>
<pre><code><a href='/constructor/boolFalse'>boolFalse</a>#bc799737 = <a href='/type/Bool'>Bool</a>;
<a href='/constructor/boolTrue'>boolTrue</a>#997275b5 = <a href='/type/Bool'>Bool</a>;
<a href='/constructor/messages.chats'>messages.chats</a>#64ff9fd5 chats:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/Chat'>Chat</a>&gt; = <a href='/type/messages.Chats'>messages.Chats</a>;
---functions---
<a href='/method/channels.setDiscussionGroup'>channels.setDiscussionGroup</a>#40582bb2 broadcast:<a href='/type/InputChannel'>InputChannel</a> group:<a href='/type/InputChannel'>InputChannel</a> = <a href='/type/Bool'>Bool</a>;
<a href='/method/channels.getGroupsForDiscussion'>channels.getGroupsForDiscussion</a>#f5dad378 = <a href='/type/messages.Chats'>messages.Chats</a>;
2022-11-15 01:03:58 +01:00
<a href='/method/channels.togglePreHistoryHidden'>channels.togglePreHistoryHidden</a>#eabbb94c channel:<a href='/type/InputChannel'>InputChannel</a> enabled:<a href='/type/Bool'>Bool</a> = <a href='/type/Updates'>Updates</a>;</code></pre>
<h3><a class="anchor" href="#requiring-users-to-join-the-group" id="requiring-users-to-join-the-group" name="requiring-users-to-join-the-group"><i class="anchor-icon"></i></a>Requiring users to join the group</h3>
2024-02-10 15:29:33 +01:00
<pre><code><a href='/constructor/channel'>channel</a>#aadfc8f flags:<a href='/type/%23'>#</a> creator:flags.0?<a href='/constructor/true'>true</a> left:flags.2?<a href='/constructor/true'>true</a> broadcast:flags.5?<a href='/constructor/true'>true</a> verified:flags.7?<a href='/constructor/true'>true</a> megagroup:flags.8?<a href='/constructor/true'>true</a> restricted:flags.9?<a href='/constructor/true'>true</a> signatures:flags.11?<a href='/constructor/true'>true</a> min:flags.12?<a href='/constructor/true'>true</a> scam:flags.19?<a href='/constructor/true'>true</a> has_link:flags.20?<a href='/constructor/true'>true</a> has_geo:flags.21?<a href='/constructor/true'>true</a> slowmode_enabled:flags.22?<a href='/constructor/true'>true</a> call_active:flags.23?<a href='/constructor/true'>true</a> call_not_empty:flags.24?<a href='/constructor/true'>true</a> fake:flags.25?<a href='/constructor/true'>true</a> gigagroup:flags.26?<a href='/constructor/true'>true</a> noforwards:flags.27?<a href='/constructor/true'>true</a> join_to_send:flags.28?<a href='/constructor/true'>true</a> join_request:flags.29?<a href='/constructor/true'>true</a> forum:flags.30?<a href='/constructor/true'>true</a> flags2:<a href='/type/%23'>#</a> stories_hidden:flags2.1?<a href='/constructor/true'>true</a> stories_hidden_min:flags2.2?<a href='/constructor/true'>true</a> stories_unavailable:flags2.3?<a href='/constructor/true'>true</a> id:<a href='/type/long'>long</a> access_hash:flags.13?<a href='/type/long'>long</a> title:<a href='/type/string'>string</a> username:flags.6?<a href='/type/string'>string</a> photo:<a href='/type/ChatPhoto'>ChatPhoto</a> date:<a href='/type/int'>int</a> restriction_reason:flags.9?<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/RestrictionReason'>RestrictionReason</a>&gt; admin_rights:flags.14?<a href='/type/ChatAdminRights'>ChatAdminRights</a> banned_rights:flags.15?<a href='/type/ChatBannedRights'>ChatBannedRights</a> default_banned_rights:flags.18?<a href='/type/ChatBannedRights'>ChatBannedRights</a> participants_count:flags.17?<a href='/type/int'>int</a> usernames:flags2.0?<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/Username'>Username</a>&gt; stories_max_id:flags2.4?<a href='/type/int'>int</a> color:flags2.7?<a href='/type/PeerColor'>PeerColor</a> profile_color:flags2.8?<a href='/type/PeerColor'>PeerColor</a> emoji_status:flags2.9?<a href='/type/EmojiStatus'>EmojiStatus</a> level:flags2.10?<a href='/type/int'>int</a> = <a href='/type/Chat'>Chat</a>;
2022-11-15 01:03:58 +01:00
---functions---
<a href='/method/channels.toggleJoinToSend'>channels.toggleJoinToSend</a>#e4cb9580 channel:<a href='/type/InputChannel'>InputChannel</a> enabled:<a href='/type/Bool'>Bool</a> = <a href='/type/Updates'>Updates</a>;</code></pre>
<p>Admins may use <a href="/method/channels.toggleJoinToSend">channels.toggleJoinToSend</a> to force users to join a discussion group before commenting.<br>
The <a href="/constructor/channel"><code>channel.join_to_send</code></a> flag will be set accordingly, and all attempts by non-members to send a message to the group will return a <code>CHAT_GUEST_SEND_FORBIDDEN</code> RPC error.</p></div>
2022-05-14 00:37:40 +02: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-05-14 00:37:40 +02: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-05-14 00:37:40 +02: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 04:52:06 +01:00
<h5><a href="https://twitter.com/telegram" target="_blank" data-track="Follow/Twitter" onclick="trackDlClick(this, event)">Twitter</a></h5>
2022-05-14 00:37:40 +02:00
</div>
</div>
</div>
</div>
2022-12-10 23:50:15 +01:00
<script src="/js/main.js?47"></script>
2022-05-14 00:37:40 +02:00
<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>