telegram-crawler/data/web/core.telegram.org/api/folders.html

236 lines
25 KiB
HTML
Raw Normal View History

2022-02-23 06:45:45 +01:00
<!DOCTYPE html>
<html class="">
<head>
<meta charset="utf-8">
<title>Folders</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="description" content="Telegram allows placing chats into folders, based on their type, mute status, or other custom criteria, thanks to folder blacklists and whitelists.">
<meta property="og:title" content="Folders">
<meta property="og:image" content="">
<meta property="og:description" content="Telegram allows placing chats into folders, based on their type, mute status, or other custom criteria, thanks to folder blacklists and whitelists.">
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 06:45:45 +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 06:45:45 +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/folders" >Folders</a></li></ul></div>
<h1 id="dev_page_title">Folders</h1>
<div id="dev_page_content"><!-- scroll_nav -->
2023-05-22 14:54:47 +02:00
<p>Telegram allows placing chats into folders, based on their type, mute status, or other custom criteria, thanks to folder blacklists and whitelists: these folders may also be shared with other users. </p>
2022-11-15 00:55:37 +01:00
<h3><a class="anchor" href="#folders" id="folders" name="folders"><i class="anchor-icon"></i></a>Folders</h3>
2022-02-23 06:45:45 +01:00
<p>Schema:</p>
<pre><code><a href='/constructor/dialogFilter'>dialogFilter</a>#7438f7e8 flags:<a href='/type/%23'>#</a> contacts:flags.0?<a href='/constructor/true'>true</a> non_contacts:flags.1?<a href='/constructor/true'>true</a> groups:flags.2?<a href='/constructor/true'>true</a> broadcasts:flags.3?<a href='/constructor/true'>true</a> bots:flags.4?<a href='/constructor/true'>true</a> exclude_muted:flags.11?<a href='/constructor/true'>true</a> exclude_read:flags.12?<a href='/constructor/true'>true</a> exclude_archived:flags.13?<a href='/constructor/true'>true</a> id:<a href='/type/int'>int</a> title:<a href='/type/string'>string</a> emoticon:flags.25?<a href='/type/string'>string</a> pinned_peers:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/InputPeer'>InputPeer</a>&gt; include_peers:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/InputPeer'>InputPeer</a>&gt; exclude_peers:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/InputPeer'>InputPeer</a>&gt; = <a href='/type/DialogFilter'>DialogFilter</a>;
2023-05-22 14:54:47 +02:00
<a href='/constructor/dialogFilterChatlist'>dialogFilterChatlist</a>#d64a04a8 flags:<a href='/type/%23'>#</a> has_my_invites:flags.26?<a href='/constructor/true'>true</a> id:<a href='/type/int'>int</a> title:<a href='/type/string'>string</a> emoticon:flags.25?<a href='/type/string'>string</a> pinned_peers:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/InputPeer'>InputPeer</a>&gt; include_peers:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/InputPeer'>InputPeer</a>&gt; = <a href='/type/DialogFilter'>DialogFilter</a>;
2022-11-15 00:55:37 +01:00
<a href='/constructor/dialogFilterDefault'>dialogFilterDefault</a>#363293ae = <a href='/type/DialogFilter'>DialogFilter</a>;
2022-02-23 06:45:45 +01:00
<a href='/constructor/dialogFilterSuggested'>dialogFilterSuggested</a>#77744d4a filter:<a href='/type/DialogFilter'>DialogFilter</a> description:<a href='/type/string'>string</a> = <a href='/type/DialogFilterSuggested'>DialogFilterSuggested</a>;
<a href='/constructor/updateDialogFilter'>updateDialogFilter</a>#26ffde7d flags:<a href='/type/%23'>#</a> id:<a href='/type/int'>int</a> filter:flags.0?<a href='/type/DialogFilter'>DialogFilter</a> = <a href='/type/Update'>Update</a>;
<a href='/constructor/updateDialogFilterOrder'>updateDialogFilterOrder</a>#a5d72105 order:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/int'>int</a>&gt; = <a href='/type/Update'>Update</a>;
<a href='/constructor/updateDialogFilters'>updateDialogFilters</a>#3504914f = <a href='/type/Update'>Update</a>;
---functions---
<a href='/method/messages.getDialogFilters'>messages.getDialogFilters</a>#f19ed96d = <a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/DialogFilter'>DialogFilter</a>&gt;;
<a href='/method/messages.getSuggestedDialogFilters'>messages.getSuggestedDialogFilters</a>#a29cd42c = <a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/DialogFilterSuggested'>DialogFilterSuggested</a>&gt;;
<a href='/method/messages.updateDialogFilter'>messages.updateDialogFilter</a>#1ad4a04a flags:<a href='/type/%23'>#</a> id:<a href='/type/int'>int</a> filter:flags.0?<a href='/type/DialogFilter'>DialogFilter</a> = <a href='/type/Bool'>Bool</a>;
<a href='/method/messages.updateDialogFiltersOrder'>messages.updateDialogFiltersOrder</a>#c563c1e4 order:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/int'>int</a>&gt; = <a href='/type/Bool'>Bool</a>;
2023-05-22 14:54:47 +02:00
<a href='/method/help.getAppConfig'>help.getAppConfig</a>#61e3f854 hash:<a href='/type/int'>int</a> = <a href='/type/help.AppConfig'>help.AppConfig</a>;</code></pre>
<p>In the API, folders are called "dialog filters".<br>
In the UI, folders are typically represented as tabs. </p>
2022-11-15 00:55:37 +01:00
<p>On startup, clients call:</p>
2022-02-23 06:45:45 +01:00
<ul>
<li><a href="/method/messages.getDialogFilters">messages.getDialogFilters</a> to fetch a list of previously configured folders.</li>
<li><a href="/method/messages.getSuggestedDialogFilters">messages.getSuggestedDialogFilters</a> to fetch a list of suggested folder combinations.</li>
<li><a href="/method/help.getAppConfig">help.getAppConfig</a> to fetch app-specific configuration parameters. </li>
</ul>
2022-11-15 00:55:37 +01:00
<p>The boolean under the <a href="/api/config#dialog-filters-tooltip"><code>dialog_filters_tooltip</code> JSON key</a> in the result of <a href="/method/help.getAppConfig">help.getAppConfig</a> can be used to determine whether a folder tooltip should be presented to the user right away.<br>
2022-02-23 06:45:45 +01:00
The UI should then show a list of suggested folder combinations. </p>
<p>Once configuration is finished, apps call <a href="/method/messages.updateDialogFilter">messages.updateDialogFilter</a> to create or update existing folders.<br>
2023-05-22 14:54:47 +02:00
As per the <a href="/constructor/dialogFilter">dialogFilter</a>/<a href="/constructor/dialogFilterChatlist">dialogFilterChatlist</a> constructors, folders have multiple flags that can be combined to determine which chats should be included in (or excluded from) the folder, which emoji to use as icon for the folder and its name.<br>
2022-11-15 00:55:37 +01:00
Folders can also have up to <code>dialogs_folder_pinned_limit_*</code> pinned chats, as determined by the <a href="/api/config#client-configuration">client configuration</a>.</p>
2023-05-22 14:54:47 +02:00
<p><a href="/constructor/dialogFilterChatlist">dialogFilterChatlist</a> constructors are used to represent imported <a href="#shared-folders">shareable folders</a>. </p>
2022-02-23 06:45:45 +01:00
<p>To reorder existing folders, <a href="/method/messages.updateDialogFiltersOrder">messages.updateDialogFiltersOrder</a> should be used with the IDs of the various dialog filters.</p>
2023-05-22 14:54:47 +02:00
<p><a href="/api/premium">Premium</a> users also have access to a <a href="/constructor/dialogFilterDefault">dialogFilterDefault</a> constructor, used only when reordering folders to indicate the default (all chats) folder. </p>
2022-02-23 06:45:45 +01:00
<p>To delete folders, use <a href="/method/messages.updateDialogFilter">messages.updateDialogFilter</a> without populating the <code>filter</code> flag field. </p>
<p>Clients can receive <a href="/constructor/updateDialogFilter">updateDialogFilter</a>, <a href="/constructor/updateDialogFilterOrder">updateDialogFilterOrder</a> updates with new filter information, generated by other clients when modifying folder info.<br>
Clients can also receive <a href="/constructor/updateDialogFilters">updateDialogFilters</a>, in which case folder info should be refetched manually using <a href="/method/messages.getDialogFilters">messages.getDialogFilters</a>.</p>
2023-05-22 14:54:47 +02:00
<h4><a class="anchor" href="#shared-folders" id="shared-folders" name="shared-folders"><i class="anchor-icon"></i></a>Shared folders</h4>
<pre><code><a href='/constructor/inputChatlistDialogFilter'>inputChatlistDialogFilter</a>#f3e0da33 filter_id:<a href='/type/int'>int</a> = <a href='/type/InputChatlist'>InputChatlist</a>;
<a href='/constructor/exportedChatlistInvite'>exportedChatlistInvite</a>#0c5181ac flags:<a href='/type/%23'>#</a> title:<a href='/type/string'>string</a> url:<a href='/type/string'>string</a> peers:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/Peer'>Peer</a>&gt; = <a href='/type/ExportedChatlistInvite'>ExportedChatlistInvite</a>;
<a href='/constructor/chatlists.exportedChatlistInvite'>chatlists.exportedChatlistInvite</a>#10e6e3a6 filter:<a href='/type/DialogFilter'>DialogFilter</a> invite:<a href='/type/ExportedChatlistInvite'>ExportedChatlistInvite</a> = <a href='/type/chatlists.ExportedChatlistInvite'>chatlists.ExportedChatlistInvite</a>;
<a href='/constructor/chatlists.exportedInvites'>chatlists.exportedInvites</a>#10ab6dc7 invites:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/ExportedChatlistInvite'>ExportedChatlistInvite</a>&gt; 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/chatlists.ExportedInvites'>chatlists.ExportedInvites</a>;
<a href='/constructor/chatlists.chatlistInviteAlready'>chatlists.chatlistInviteAlready</a>#fa87f659 filter_id:<a href='/type/int'>int</a> missing_peers:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/Peer'>Peer</a>&gt; already_peers:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/Peer'>Peer</a>&gt; 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/chatlists.ChatlistInvite'>chatlists.ChatlistInvite</a>;
<a href='/constructor/chatlists.chatlistInvite'>chatlists.chatlistInvite</a>#1dcd839d flags:<a href='/type/%23'>#</a> title:<a href='/type/string'>string</a> emoticon:flags.0?<a href='/type/string'>string</a> peers:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/Peer'>Peer</a>&gt; 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/chatlists.ChatlistInvite'>chatlists.ChatlistInvite</a>;
<a href='/constructor/chatlists.chatlistUpdates'>chatlists.chatlistUpdates</a>#93bd878d missing_peers:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/Peer'>Peer</a>&gt; 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/chatlists.ChatlistUpdates'>chatlists.ChatlistUpdates</a>;
---functions---
<a href='/method/chatlists.exportChatlistInvite'>chatlists.exportChatlistInvite</a>#8472478e chatlist:<a href='/type/InputChatlist'>InputChatlist</a> title:<a href='/type/string'>string</a> peers:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/InputPeer'>InputPeer</a>&gt; = <a href='/type/chatlists.ExportedChatlistInvite'>chatlists.ExportedChatlistInvite</a>;
<a href='/method/chatlists.getExportedInvites'>chatlists.getExportedInvites</a>#ce03da83 chatlist:<a href='/type/InputChatlist'>InputChatlist</a> = <a href='/type/chatlists.ExportedInvites'>chatlists.ExportedInvites</a>;
<a href='/method/chatlists.editExportedInvite'>chatlists.editExportedInvite</a>#653db63d flags:<a href='/type/%23'>#</a> chatlist:<a href='/type/InputChatlist'>InputChatlist</a> slug:<a href='/type/string'>string</a> title:flags.1?<a href='/type/string'>string</a> peers:flags.2?<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/InputPeer'>InputPeer</a>&gt; = <a href='/type/ExportedChatlistInvite'>ExportedChatlistInvite</a>;
<a href='/method/chatlists.deleteExportedInvite'>chatlists.deleteExportedInvite</a>#719c5c5e chatlist:<a href='/type/InputChatlist'>InputChatlist</a> slug:<a href='/type/string'>string</a> = <a href='/type/Bool'>Bool</a>;
<a href='/method/chatlists.checkChatlistInvite'>chatlists.checkChatlistInvite</a>#41c10fff slug:<a href='/type/string'>string</a> = <a href='/type/chatlists.ChatlistInvite'>chatlists.ChatlistInvite</a>;
<a href='/method/chatlists.joinChatlistInvite'>chatlists.joinChatlistInvite</a>#a6b1e39a slug:<a href='/type/string'>string</a> peers:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/InputPeer'>InputPeer</a>&gt; = <a href='/type/Updates'>Updates</a>;
<a href='/method/chatlists.getChatlistUpdates'>chatlists.getChatlistUpdates</a>#89419521 chatlist:<a href='/type/InputChatlist'>InputChatlist</a> = <a href='/type/chatlists.ChatlistUpdates'>chatlists.ChatlistUpdates</a>;
<a href='/method/chatlists.joinChatlistUpdates'>chatlists.joinChatlistUpdates</a>#e089f8f5 chatlist:<a href='/type/InputChatlist'>InputChatlist</a> peers:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/InputPeer'>InputPeer</a>&gt; = <a href='/type/Updates'>Updates</a>;
<a href='/method/chatlists.hideChatlistUpdates'>chatlists.hideChatlistUpdates</a>#66e486fb chatlist:<a href='/type/InputChatlist'>InputChatlist</a> = <a href='/type/Bool'>Bool</a>;
<a href='/method/chatlists.getLeaveChatlistSuggestions'>chatlists.getLeaveChatlistSuggestions</a>#fdbcd714 chatlist:<a href='/type/InputChatlist'>InputChatlist</a> = <a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/Peer'>Peer</a>&gt;;
<a href='/method/chatlists.leaveChatlist'>chatlists.leaveChatlist</a>#74fae13a chatlist:<a href='/type/InputChatlist'>InputChatlist</a> peers:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/InputPeer'>InputPeer</a>&gt; = <a href='/type/Updates'>Updates</a>;</code></pre>
<p>Folders may be shared using <a href="/api/links#chat-folder-links">chat folder deep links</a>.<br>
These links are generated by invoking <a href="/method/chatlists.exportChatlistInvite">chatlists.exportChatlistInvite</a>, passing the ID of the folder that should be exported, along with a list of <code>peers</code> that should be included in the shared folder.<br>
Only channels and groups/supergroups may be specified in the <code>peers</code> array; these channels and groups must be public, or the user must have permission to manage invite links. Basic groups will automatically be <a href="/api/channel#migration">converted to supergroups</a> when invoking the method.<br>
An optional name for the shared link may also be specified using <code>title</code>. </p>
<p>Use <a href="/method/chatlists.getExportedInvites">chatlists.getExportedInvites</a> to list all links generated for a folder, use <a href="/method/chatlists.editExportedInvite">chatlists.editExportedInvite</a> to edit the title or list of <code>peers</code> of a specific link and <a href="/method/chatlists.deleteExportedInvite">chatlists.deleteExportedInvite</a> to revoke an exported link, preventing new users from importing it. </p>
<p>The maximum number of per-folder invites that can be created by <a href="/api/premium">Premium</a>/non-<a href="/api/premium">Premium</a> users is specified by the <code>chatlist_invites_limit_default</code>/<code>chatlist_invites_limit_premium</code> <a href="/api/config#chatlist-invites-limit-default">client configuration parameters »</a>. </p>
<p>Use <a href="/method/chatlists.checkChatlistInvite">chatlists.checkChatlistInvite</a> to obtain information about a chat folder deep link before importing it with <a href="/method/chatlists.joinChatlistInvite">chatlists.joinChatlistInvite</a>, specifying in <code>peers</code> which channels and groups to join (excluding inaccessible channels/supergroups, i.e. the user may not join a supergroup/channel where they were banned, corresponding to a <a href="/constructor/channelForbidden">channelForbidden</a> constructor).<br>
If the user can't join any of the <code>peers</code> of a folder, the folder can't be imported.</p>
<p>The maximum number of shareable folders that a <a href="/api/premium">Premium</a>/non-<a href="/api/premium">Premium</a> user may join is specified by the <code>chatlists_joined_limit_default</code>/<code>chatlists_joined_limit_premium</code> <a href="/api/config#chatlists-joined-limit-default">client configuration parameters »</a>. </p>
<p>Users that import a folder should retrieve additions made to the peer list by invoking <a href="/method/chatlists.getChatlistUpdates">chatlists.getChatlistUpdates</a> at most every <code>chatlist_update_period</code> seconds (a <a href="/api/config#chatlist-update-period">client configuration parameter »</a>).<br>
If the returned <code>missing_peers</code> list is non-empty, the client should present it to the user, who may choose to join all or a subset of them (excluding inaccessible channels/supergroups), passing them to the <code>peers</code> parameter of <a href="/method/chatlists.joinChatlistUpdates">chatlists.joinChatlistUpdates</a>.<br>
If after excluding inaccessible peers and peers deselected by the user the <code>peers</code> list is empty, invoke <a href="/method/chatlists.hideChatlistUpdates">chatlists.hideChatlistUpdates</a> instead of <a href="/method/chatlists.joinChatlistUpdates">chatlists.joinChatlistUpdates</a>.</p>
<p>When removing an imported folder, the list of included peers should be presented to the user prior to deletion, with the peers listed in <a href="/method/chatlists.getLeaveChatlistSuggestions">chatlists.getLeaveChatlistSuggestions</a> already pre-marked for deletion: the user may then choose to delete or keep some or all of the groups and channels of the folder when invoking <a href="/method/chatlists.leaveChatlist">chatlists.leaveChatlist</a> to delete the folder, specifying in <code>peers</code> the list of channels and groups from the folder that should also be removed.</p>
2022-02-23 06:45:45 +01:00
<h3><a class="anchor" href="#peer-folders" id="peer-folders" name="peer-folders"><i class="anchor-icon"></i></a>Peer folders</h3>
2022-11-15 00:55:37 +01:00
<p>The API also has another method for identifying groups of peers, used by archived chats.</p>
2022-02-23 06:45:45 +01:00
<p>Schema:</p>
2022-11-15 00:55:37 +01:00
<pre><code><a href='/constructor/inputFolderPeer'>inputFolderPeer</a>#fbd2c296 peer:<a href='/type/InputPeer'>InputPeer</a> folder_id:<a href='/type/int'>int</a> = <a href='/type/InputFolderPeer'>InputFolderPeer</a>;
2022-02-23 06:45:45 +01:00
2022-11-15 00:55:37 +01:00
<a href='/constructor/folderPeer'>folderPeer</a>#e9baa668 peer:<a href='/type/Peer'>Peer</a> folder_id:<a href='/type/int'>int</a> = <a href='/type/FolderPeer'>FolderPeer</a>;
2022-02-23 06:45:45 +01:00
<a href='/constructor/updateFolderPeers'>updateFolderPeers</a>#19360dc0 folder_peers:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/FolderPeer'>FolderPeer</a>&gt; pts:<a href='/type/int'>int</a> pts_count:<a href='/type/int'>int</a> = <a href='/type/Update'>Update</a>;
<a href='/constructor/updates'>updates</a>#74ae4240 updates:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/Update'>Update</a>&gt; users:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/User'>User</a>&gt; chats:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/Chat'>Chat</a>&gt; date:<a href='/type/int'>int</a> seq:<a href='/type/int'>int</a> = <a href='/type/Updates'>Updates</a>;
2022-11-15 00:55:37 +01:00
<a href='/constructor/inputDialogPeer'>inputDialogPeer</a>#fcaafeb7 peer:<a href='/type/InputPeer'>InputPeer</a> = <a href='/type/InputDialogPeer'>InputDialogPeer</a>;
<a href='/constructor/inputDialogPeerFolder'>inputDialogPeerFolder</a>#64600527 folder_id:<a href='/type/int'>int</a> = <a href='/type/InputDialogPeer'>InputDialogPeer</a>;
<a href='/constructor/dialogPeer'>dialogPeer</a>#e56dbf05 peer:<a href='/type/Peer'>Peer</a> = <a href='/type/DialogPeer'>DialogPeer</a>;
<a href='/constructor/dialogPeerFolder'>dialogPeerFolder</a>#514519e2 folder_id:<a href='/type/int'>int</a> = <a href='/type/DialogPeer'>DialogPeer</a>;
2022-02-23 06:45:45 +01:00
---functions---
2023-05-22 14:54:47 +02:00
<a href='/method/folders.editPeerFolders'>folders.editPeerFolders</a>#6847d0ab folder_peers:<a href='/type/Vector%20t'>Vector</a>&lt;<a href='/type/InputFolderPeer'>InputFolderPeer</a>&gt; = <a href='/type/Updates'>Updates</a>;</code></pre>
<p>API peer folders are typically used only by <a href="https://telegram.org/blog/archive-and-new-design">archived chats</a>, and are really handy for distinguishing groups of peers, since most peer-related constructors (updates, chat info) will contain the <code>folder_id</code> assigned the specified chat. </p>
2022-02-23 06:45:45 +01:00
<p>In Telegram apps, API peer folders are used only to implement the chat archive, identified by <code>folder_id</code> <code>1</code>; all other peers are in <code>folder_id</code> <code>0</code> by default; no other <code>folder_id</code> is allowed at the moment.</p>
<ul>
<li><a href="/method/folders.editPeerFolders">folders.editPeerFolders</a> can be used to add and remove peers from peer folders.</li>
</ul>
<p>Both methods return an <a href="/constructor/updates">updates</a> constructor, containing a single <a href="/constructor/updateFolderPeers">updateFolderPeers</a> with the new <code>folder_id</code> of moved peers.<br>
2022-11-15 00:55:37 +01:00
Clients can also receive <a href="/constructor/updateFolderPeers">updateFolderPeers</a> as a normal <a href="/api/updates">update</a>, generated by other clients when modifying peer folders.</p>
2023-05-22 14:54:47 +02:00
<p>Clients can then use <a href="/type/InputDialogPeer">InputDialogPeer</a> to refer either to a specific chat, or to all chats in a peer folder: the server will return a <a href="/type/DialogPeer">DialogPeer</a> in certain constructors for the same purpose.</p></div>
2022-02-23 06:45:45 +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 06:45:45 +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 06:45:45 +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 06:33:15 +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 06:45:45 +01:00
</div>
</div>
</div>
</div>
2022-12-10 23:50:15 +01:00
<script src="/js/main.js?47"></script>
2022-02-23 06:45:45 +01: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>