diff --git a/data/web/corefork.telegram.org/api/forum.html b/data/web/corefork.telegram.org/api/forum.html index c473b463ac..f8949a5f9d 100644 --- a/data/web/corefork.telegram.org/api/forum.html +++ b/data/web/corefork.telegram.org/api/forum.html @@ -48,8 +48,6 @@

Forums

channel#83259464 flags:# creator:flags.0?true left:flags.2?true broadcast:flags.5?true verified:flags.7?true megagroup:flags.8?true restricted:flags.9?true signatures:flags.11?true min:flags.12?true scam:flags.19?true has_link:flags.20?true has_geo:flags.21?true slowmode_enabled:flags.22?true call_active:flags.23?true call_not_empty:flags.24?true fake:flags.25?true gigagroup:flags.26?true noforwards:flags.27?true join_to_send:flags.28?true join_request:flags.29?true forum:flags.30?true flags2:# id:long access_hash:flags.13?long title:string username:flags.6?string photo:ChatPhoto date:int restriction_reason:flags.9?Vector<RestrictionReason> admin_rights:flags.14?ChatAdminRights banned_rights:flags.15?ChatBannedRights default_banned_rights:flags.18?ChatBannedRights participants_count:flags.17?int usernames:flags2.0?Vector<Username> = Chat;
 
-channelAdminLogEventActionToggleForum#02cc6383 new_value:Bool = ChannelAdminLogEventAction;
-
 ---functions---
 
 channels.createChannel#91006707 flags:# broadcast:flags.0?true megagroup:flags.1?true for_import:flags.3?true forum:flags.5?true title:string about:string geo_point:flags.2?InputGeoPoint address:flags.2?string ttl_period:flags.4?int = Updates;
@@ -60,45 +58,48 @@
 

Note that the channels.toggleForum method can only be invoked by admins with owner rights.

Forums have the channel.forum flag set, and conversation happens in distinct forum topics.

Forum topics

-
chatAdminRights#5fb224d5 flags:# change_info:flags.0?true post_messages:flags.1?true edit_messages:flags.2?true delete_messages:flags.3?true ban_users:flags.4?true invite_users:flags.5?true pin_messages:flags.7?true add_admins:flags.9?true anonymous:flags.10?true manage_call:flags.11?true other:flags.12?true manage_topics:flags.13?true = ChatAdminRights;
-chatBannedRights#9f120418 flags:# view_messages:flags.0?true send_messages:flags.1?true send_media:flags.2?true send_stickers:flags.3?true send_gifs:flags.4?true send_games:flags.5?true send_inline:flags.6?true embed_links:flags.7?true send_polls:flags.8?true change_info:flags.10?true invite_users:flags.15?true pin_messages:flags.17?true manage_topics:flags.18?true send_photos:flags.19?true send_videos:flags.20?true send_roundvideos:flags.21?true send_audios:flags.22?true send_voices:flags.23?true send_docs:flags.24?true send_plain:flags.25?true until_date:int = ChatBannedRights;
-
-updateChannelPinnedTopic#192efbe3 flags:# pinned:flags.0?true channel_id:long topic_id:int = Update;
-updateChannelPinnedTopics#fe198602 flags:# channel_id:long order:flags.0?Vector<int> = Update;
-
-channelAdminLogEventActionCreateTopic#58707d28 topic:ForumTopic = ChannelAdminLogEventAction;
-channelAdminLogEventActionEditTopic#f06fe208 prev_topic:ForumTopic new_topic:ForumTopic = ChannelAdminLogEventAction;
-channelAdminLogEventActionDeleteTopic#ae168909 topic:ForumTopic = ChannelAdminLogEventAction;
-channelAdminLogEventActionPinTopic#5d8d353b flags:# prev_topic:flags.0?ForumTopic new_topic:flags.1?ForumTopic = ChannelAdminLogEventAction;
+
forumTopic#71701da9 flags:# my:flags.1?true closed:flags.2?true pinned:flags.3?true short:flags.5?true hidden:flags.6?true id:int date:int title:string icon_color:int icon_emoji_id:flags.0?long top_message:int read_inbox_max_id:int read_outbox_max_id:int unread_count:int unread_mentions_count:int unread_reactions_count:int from_id:Peer notify_settings:PeerNotifySettings draft:flags.4?DraftMessage = ForumTopic;
 forumTopicDeleted#023f109b id:int = ForumTopic;
-forumTopic#71701da9 flags:# my:flags.1?true closed:flags.2?true pinned:flags.3?true short:flags.5?true hidden:flags.6?true id:int date:int title:string icon_color:int icon_emoji_id:flags.0?long top_message:int read_inbox_max_id:int read_outbox_max_id:int unread_count:int unread_mentions_count:int unread_reactions_count:int from_id:Peer notify_settings:PeerNotifySettings draft:flags.4?DraftMessage = ForumTopic;
 
 messages.forumTopics#367617d3 flags:# order_by_create_date:flags.0?true count:int topics:Vector<ForumTopic> messages:Vector<Message> chats:Vector<Chat> users:Vector<User> pts:int = messages.ForumTopics;
 
+inputStickerSetEmojiDefaultTopicIcons#44c1f8e9 = InputStickerSet;
+
 messageActionTopicCreate#0d999256 flags:# title:string icon_color:int icon_emoji_id:flags.0?long = MessageAction;
 messageActionTopicEdit#c0944820 flags:# title:flags.0?string icon_emoji_id:flags.1?long closed:flags.2?Bool hidden:flags.3?Bool = MessageAction;
 
 updateChannelPinnedTopic#192efbe3 flags:# pinned:flags.0?true channel_id:long topic_id:int = Update;
-
-inputStickerSetEmojiDefaultTopicIcons#44c1f8e9 = InputStickerSet;
+updateChannelPinnedTopics#fe198602 flags:# channel_id:long order:flags.0?Vector<int> = Update;
 
 ---functions---
 
-channels.createForumTopic#f40c0224 flags:# channel:InputChannel title:string icon_color:flags.0?int icon_emoji_id:flags.3?long random_id:long send_as:flags.2?InputPeer = Updates;
-channels.editForumTopic#f4dfa185 flags:# channel:InputChannel topic_id:int title:flags.0?string icon_emoji_id:flags.1?long closed:flags.2?Bool hidden:flags.3?Bool = Updates;
-
-channels.deleteTopicHistory#34435f2d channel:InputChannel top_msg_id:int = messages.AffectedHistory;
-
 channels.getForumTopics#0de560d1 flags:# channel:InputChannel q:flags.0?string offset_date:int offset_id:int offset_topic:int limit:int = messages.ForumTopics;
 channels.getForumTopicsByID#b0831eb9 channel:InputChannel topics:Vector<int> = messages.ForumTopics;
 
-channels.reorderPinnedForumTopics#2950a18f flags:# force:flags.0?true channel:InputChannel order:Vector<int> = Updates;
-channels.updatePinnedForumTopic#6c2d9026 channel:InputChannel topic_id:int pinned:Bool = Updates;
+channels.deleteTopicHistory#34435f2d channel:InputChannel top_msg_id:int = messages.AffectedHistory; + +channels.createForumTopic#f40c0224 flags:# channel:InputChannel title:string icon_color:flags.0?int icon_emoji_id:flags.3?long random_id:long send_as:flags.2?InputPeer = Updates; +channels.editForumTopic#f4dfa185 flags:# channel:InputChannel topic_id:int title:flags.0?string icon_emoji_id:flags.1?long closed:flags.2?Bool hidden:flags.3?Bool = Updates; + +channels.updatePinnedForumTopic#6c2d9026 channel:InputChannel topic_id:int pinned:Bool = Updates; +channels.reorderPinnedForumTopics#2950a18f flags:# force:flags.0?true channel:InputChannel order:Vector<int> = Updates;

Forums can have multiple topics where users may interact.

-

Topics can be created by using the channels.createForumTopic method, and may be modified with the channels.editForumTopic method: these actions require manage_topics rights.

-

Topics have a name (title) and an icon: -Topics can be temporarily closed, preventing further messages from being sent to the topic

-

Forum

+

To fetch the topic list of a forum, use channels.getForumTopics; the same method can be used to search topics by their name.
+To fetch information about one or more topics by their ID, use channels.getForumTopicsByID.

+

Every forum has a non-deletable "General" topic, with id=1; other topics will have other IDs, equal to the messageActionTopicCreate service message that created the topic.

+

To send messages to the "General" topic, just use messages.sendMessage as usual, as if you were writing to a normal supergroup.
+On the other hands, topics with id != 1 are just the message thread of the messageActionTopicCreate service message that created that topic.
+This means that topics should be treated similarly to message threads by the client.
+To send messages to these topics, pass the topic ID to the reply_msg_id parameter of messages.sendMessage, sendMedia et cetera.
+Replies to messages within a topic work as usual, however, since message threads can't have nested message threads, topics (except for the "General" topic) also can't have message threads (so replies to messages within topics won't generate further message threads).

+

Topics have a name (title) and an icon: the icon can be a custom emoji specified by the icon_emoji_id, or a default chat icon if icon_emoji_id is not set, filled with the color specified in icon_color.
+Topics can be temporarily closed, preventing further messages from being sent to the topic.
+Additionally, the "General" topic may also be hidden.
+All topics except for the "General" topic can be deleted by invoking channels.deleteTopicHistory, with the topic ID.

+

Topics can be created by using the channels.createForumTopic method, and may be modified with the channels.editForumTopic method: these actions require manage_topics rights, and will generate messageActionTopicCreate/messageActionTopicEdit service messages.

+

Note that Telegram Premium users can pass any custom emoji to icon_emoji_id, while other users can only use the custom emojis contained in the inputStickerSetEmojiDefaultTopicIcons emoji pack.
+If the default chat icon is used, its color cannot be modified after creating the topic.

+

Topics may be pinned or unpinned using channels.updatePinnedForumTopic; use channels.reorderPinnedForumTopics to reorder pinned topics.

diff --git a/data/web/corefork.telegram.org/api/links.html b/data/web/corefork.telegram.org/api/links.html index 52907c32ed..668da80e29 100644 --- a/data/web/corefork.telegram.org/api/links.html +++ b/data/web/corefork.telegram.org/api/links.html @@ -59,12 +59,11 @@
  • tg://path?query
  • The #fragment part is always ignored.

    -

    Also note that whenever a <username>.t.me link is encountered and <username> is not equal to www, is not a single letter and is a valid username, it should be treated exactly as a t.me/<username>/ link (generate a t.me/<username> link and append the rest of the path (if present) and the query string (if present)).

    +

    Also note that whenever a <username>.t.me link is encountered and <username> is not equal to www, is not a single letter and is a valid username, it should be treated exactly as a t.me/<username>/ link (generate a t.me/<username>/ link and append the rest of the path (if present) and the query string (if present)).

    Public username links

    Used to link to public users, groups and channels, see here for more info on how to handle them ยป.

    t.me syntax:

    -
    t.me/<username>
    -<username>.t.me
    +
    t.me/<username>

    tg: syntax:

    tg://resolve?domain=<username>

    Parameters:

    @@ -217,6 +216,12 @@ t.me/c/<channel>/<thread_id>/<id>?single&comment=<messa +

    Note that since a forum topic ID is actually the ID of the service message that created the topic, whenever the client resolves a message link that points to a messageActionTopicCreate service message, it should open the topic, instead.
    +Also, if the message ID is 1 and the linked-to supergroup is a forum, the "General" topic should be opened instead of the first message of the supergroup.

    +

    Forum topic links

    +

    Used to link to a specific forum topic.

    +

    The syntax is exactly the same as for message links, because the topic ID is actually the ID of the service message that created the topic, so whenever the client resolves a message link that points to a messageActionTopicCreate service message, it should open the topic, instead.

    +

    Also, if the message ID is 1 and the linked-to supergroup is a forum, the "General" topic should be opened instead of the first message of the supergroup.

    Share links

    Used to share a prepared message and URL into a chosen chat's text field.
    These links should be handled as follows:

    diff --git a/data/web/corefork.telegram.org/method/messageActionTopicCreate.html b/data/web/corefork.telegram.org/method/messageActionTopicCreate.html new file mode 100644 index 0000000000..45855bd0c0 --- /dev/null +++ b/data/web/corefork.telegram.org/method/messageActionTopicCreate.html @@ -0,0 +1,118 @@ + + + + + Page not found + + + + + + + + + + + + + + + + +
    + +
    +
    +
    + +

    Page not found

    + +
    The page has not been saved
    + +
    + +
    +
    + +
    + + + + + +