diff --git a/data/web/corefork.telegram.org/api/discussion.html b/data/web/corefork.telegram.org/api/discussion.html index cc8be3ec6d..9f266fee9e 100644 --- a/data/web/corefork.telegram.org/api/discussion.html +++ b/data/web/corefork.telegram.org/api/discussion.html @@ -55,10 +55,14 @@ messageReplies#83d60fc2 flags:# comments:flags.0?true replies:int replies_pts:int recent_repliers:flags.1?Vector<Peer> channel_id:flags.0?long max_id:flags.2?int read_max_id:flags.3?int = MessageReplies; +messages.discussionMessage#a6341782 flags:# messages:Vector<Message> max_id:flags.0?int read_inbox_max_id:flags.1?int read_outbox_max_id:flags.2?int unread_count:int chats:Vector<Chat> users:Vector<User> = messages.DiscussionMessage; + ---functions--- channels.setDiscussionGroup#40582bb2 broadcast:InputChannel group:InputChannel = Bool; -channels.getGroupsForDiscussion#f5dad378 = messages.Chats; +channels.getGroupsForDiscussion#f5dad378 = messages.Chats; + +messages.getDiscussionMessage#446972fd peer:InputPeer msg_id:int = messages.DiscussionMessage;
A discussion group can be associated to a channel using channels.setDiscussionGroup.
The discussion group can be accessed in the client by clicking on the discuss button of the channel, or by accessing the comment section of a specific post; the discussion group ID is also present in the linked_chat_id
field of the channelFull constructor.
All messages sent to the channel will also be forwarded to the linked group (with sender peer from_id
equal to the peer of the linked channel); those messages will also be automatically pinned in the group.
replies.channel_id
will contain the ID of the linked discussion supergroupreplies.recent_repliers
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.replies.replies
will contains the total number of replies in the comment section.replies.max_id
will contain the ID of the latest message in the comment section.replies.replies_pts
will contain the PTS of the autoforwarded channel message that started the comment section.replies.max_id
may contain the ID of the latest message in the comment section, if any.replies.replies_pts
may contain the PTS of the autoforwarded channel message that started the comment section.The same messageReplies constructor with the usual flags for a thread (i.e. without channel_id
, recent_replies
) will also be present in the message automatically forwarded to the discussion group, as for all group messages that start a thread.
The ID of the channel message that was autoforwaded to the discussion group can be fetched using the using the replies.replies_pts
field of the channel post, or by fetching the last message in the discussion (replies.max_id
); the ID of the autoforwarded channel message will be in reply_to.reply_to_top_id
.
Use messages.getDiscussionMessage to obtain the initial messages of the message thread of the autoforwaded channel message in the linked discussion supergroup.
+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.
messageFwdHeader#5f777dce flags:# imported:flags.7?true from_id:flags.0?Peer from_name:flags.5?string date:int channel_post:flags.2?int post_author:flags.3?string saved_from_peer:flags.4?Peer saved_from_msg_id:flags.4?int psa_type:flags.6?string = MessageFwdHeader;
diff --git a/data/web/corefork.telegram.org/constructor/messages.discussionMessage.html b/data/web/corefork.telegram.org/constructor/messages.discussionMessage.html
index 8c8b395367..dabdcf95d9 100644
--- a/data/web/corefork.telegram.org/constructor/messages.discussionMessage.html
+++ b/data/web/corefork.telegram.org/constructor/messages.discussionMessage.html
@@ -74,7 +74,7 @@
messages
Vector<Message>
-Discussion messages
+The messages from which the thread starts. The messages are returned in reverse chronological order (i.e., in order of decreasing message ID).
max_id
diff --git a/data/web/fragment.com/js/auction.js b/data/web/fragment.com/js/auction.js
index 0fdf6e5dfc..a5cb43cd86 100644
--- a/data/web/fragment.com/js/auction.js
+++ b/data/web/fragment.com/js/auction.js
@@ -1048,9 +1048,7 @@ var Assets = {
username: username,
auction: true
}, function(result) {
- if (result.error) {
- return showAlert(result.error);
- } else if (result.confirm_message) {
+ if (result.confirm_message) {
showConfirm(result.confirm_message, function() {
doPutToAuction();
}, result.confirm_button);
@@ -1150,9 +1148,7 @@ var Assets = {
username: username,
auction: false
}, function(result) {
- if (result.error) {
- return showAlert(result.error);
- } else if (result.confirm_message) {
+ if (result.confirm_message) {
showConfirm(result.confirm_message, function() {
doSellUsername();
}, result.confirm_button);