mirror of
https://github.com/MarshalX/telegram-crawler.git
synced 2024-12-29 07:52:37 +01:00
Update content of files
This commit is contained in:
parent
823e4444d4
commit
0a71517e19
4 changed files with 29 additions and 28 deletions
|
@ -46,7 +46,6 @@
|
|||
|
||||
<p>Telegram allows placing chats into folders, based on their type, mute status, or other custom criteria, thanks to folder blacklists and whitelists. </p>
|
||||
<h3><a class="anchor" href="#folders" id="folders" name="folders"><i class="anchor-icon"></i></a>Folders</h3>
|
||||
<p>In the API, folders are called "dialog filters"; in the UI, they are typically represented as tabs. </p>
|
||||
<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><<a href='/type/InputPeer'>InputPeer</a>> include_peers:<a href='/type/Vector%20t'>Vector</a><<a href='/type/InputPeer'>InputPeer</a>> exclude_peers:<a href='/type/Vector%20t'>Vector</a><<a href='/type/InputPeer'>InputPeer</a>> = <a href='/type/DialogFilter'>DialogFilter</a>;
|
||||
<a href='/constructor/dialogFilterDefault'>dialogFilterDefault</a>#363293ae = <a href='/type/DialogFilter'>DialogFilter</a>;
|
||||
|
@ -65,6 +64,8 @@
|
|||
<a href='/method/messages.updateDialogFiltersOrder'>messages.updateDialogFiltersOrder</a>#c563c1e4 order:<a href='/type/Vector%20t'>Vector</a><<a href='/type/int'>int</a>> = <a href='/type/Bool'>Bool</a>;
|
||||
|
||||
<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>
|
||||
<p>On startup, clients call:</p>
|
||||
<ul>
|
||||
<li><a href="/method/messages.getDialogFilters">messages.getDialogFilters</a> to fetch a list of previously configured folders.</li>
|
||||
|
@ -101,13 +102,11 @@ Clients can also receive <a href="/constructor/updateDialogFilters">updateDialog
|
|||
|
||||
---functions---
|
||||
|
||||
<a href='/method/folders.editPeerFolders'>folders.editPeerFolders</a>#6847d0ab folder_peers:<a href='/type/Vector%20t'>Vector</a><<a href='/type/InputFolderPeer'>InputFolderPeer</a>> = <a href='/type/Updates'>Updates</a>;
|
||||
<a href='/method/folders.deleteFolder'>folders.deleteFolder</a>#1c295881 folder_id:<a href='/type/int'>int</a> = <a href='/type/Updates'>Updates</a>;</code></pre>
|
||||
<a href='/method/folders.editPeerFolders'>folders.editPeerFolders</a>#6847d0ab folder_peers:<a href='/type/Vector%20t'>Vector</a><<a href='/type/InputFolderPeer'>InputFolderPeer</a>> = <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>
|
||||
<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>
|
||||
<li><a href="/method/folders.deleteFolder">folders.deleteFolder</a> can be used to delete peer folders, moving all peers previously present in that folder to the default <code>0</code> folder.</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>
|
||||
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>
|
||||
|
|
|
@ -123,6 +123,9 @@ If set, <code>rotation</code> indicates clockwise rotation angle of the gradient
|
|||
<a href='/constructor/account.wallPapersNotModified'>account.wallPapersNotModified</a>#1c199183 = <a href='/type/account.WallPapers'>account.WallPapers</a>;
|
||||
<a href='/constructor/account.wallPapers'>account.wallPapers</a>#cdc3858c hash:<a href='/type/long'>long</a> wallpapers:<a href='/type/Vector%20t'>Vector</a><<a href='/type/WallPaper'>WallPaper</a>> = <a href='/type/account.WallPapers'>account.WallPapers</a>;
|
||||
|
||||
<a href='/constructor/messageActionSetChatWallPaper'>messageActionSetChatWallPaper</a>#bc44a927 wallpaper:<a href='/type/WallPaper'>WallPaper</a> = <a href='/type/MessageAction'>MessageAction</a>;
|
||||
<a href='/constructor/messageActionSetSameChatWallPaper'>messageActionSetSameChatWallPaper</a>#c0787d6d wallpaper:<a href='/type/WallPaper'>WallPaper</a> = <a href='/type/MessageAction'>MessageAction</a>;
|
||||
|
||||
---functions---
|
||||
|
||||
<a href='/method/account.getWallPaper'>account.getWallPaper</a>#fc8ddbea wallpaper:<a href='/type/InputWallPaper'>InputWallPaper</a> = <a href='/type/WallPaper'>WallPaper</a>;
|
||||
|
@ -131,9 +134,11 @@ If set, <code>rotation</code> indicates clockwise rotation angle of the gradient
|
|||
<a href='/method/account.saveWallPaper'>account.saveWallPaper</a>#6c5a5b37 wallpaper:<a href='/type/InputWallPaper'>InputWallPaper</a> unsave:<a href='/type/Bool'>Bool</a> settings:<a href='/type/WallPaperSettings'>WallPaperSettings</a> = <a href='/type/Bool'>Bool</a>;
|
||||
<a href='/method/account.installWallPaper'>account.installWallPaper</a>#feed5769 wallpaper:<a href='/type/InputWallPaper'>InputWallPaper</a> settings:<a href='/type/WallPaperSettings'>WallPaperSettings</a> = <a href='/type/Bool'>Bool</a>;
|
||||
<a href='/method/account.getWallPapers'>account.getWallPapers</a>#7967d36 hash:<a href='/type/long'>long</a> = <a href='/type/account.WallPapers'>account.WallPapers</a>;
|
||||
<a href='/method/account.resetWallPapers'>account.resetWallPapers</a>#bb3b9804 = <a href='/type/Bool'>Bool</a>;</code></pre>
|
||||
<a href='/method/account.resetWallPapers'>account.resetWallPapers</a>#bb3b9804 = <a href='/type/Bool'>Bool</a>;
|
||||
|
||||
<a href='/method/messages.setChatWallPaper'>messages.setChatWallPaper</a>#8ffacae1 flags:<a href='/type/%23'>#</a> peer:<a href='/type/InputPeer'>InputPeer</a> wallpaper:flags.0?<a href='/type/InputWallPaper'>InputWallPaper</a> settings:flags.2?<a href='/type/WallPaperSettings'>WallPaperSettings</a> id:flags.1?<a href='/type/int'>int</a> = <a href='/type/Updates'>Updates</a>;</code></pre>
|
||||
<p>Once you've <a href="#uploading-wallpapers">uploaded your wallpaper</a> or received a <a href="/api/links#wallpaper-links">wallpaper deep link</a>, it can be installed as follows. </p>
|
||||
<p><em>Note that <a href="#fill-wallpapers">fill wallpapers</a> cannot be installed using the API, clients should install and keep track of them only locally, without synchronizing the wallpaper list or signaling installations.</em></p>
|
||||
<p><em>Note that <a href="#fill-wallpapers">fill wallpapers</a> cannot be globally installed using installWallpaper or saveWallpaper, clients should install and keep track of them only locally, without synchronizing the wallpaper list or signaling installations.</em></p>
|
||||
<p>The API keeps a list of wallpapers that the user can set as chat background, including some preinstalled ones.<br>
|
||||
To fetch the list use <a href="/method/account.getWallPapers">account.getWallPapers</a>.<br>
|
||||
To save a wallpaper to the list use <a href="/method/account.saveWallPaper">account.saveWallPaper</a> with <code>unsave=false</code>.<br>
|
||||
|
@ -145,8 +150,11 @@ Note that calling this method will also automatically save the wallpaper, if it'
|
|||
<ul>
|
||||
<li><a href="/constructor/inputWallPaperSlug">inputWallPaperSlug</a> when working with <a href="/api/links#wallpaper-links">wallpaper deep links</a>.</li>
|
||||
<li><a href="/constructor/inputWallPaper">inputWallPaper</a> otherwise, using the ID and access hash fields of a full <a href="/constructor/wallPaper">wallPaper</a>.<br>
|
||||
As mentioned earlier, <a href="#fill-wallpapers">fill wallpapers</a> can't be saved to the server: an <a href="/constructor/inputWallPaperNoFile">inputWallPaperNoFile</a> is available for fill wallpapers but can <strong>only</strong> be used when working with <a href="/api/themes">themes »</a>.</li>
|
||||
</ul></div>
|
||||
As mentioned earlier, <a href="#fill-wallpapers">fill wallpapers</a> can't be saved to the server using installWallpaper or saveWallpaper: an <a href="/constructor/inputWallPaperNoFile">inputWallPaperNoFile</a> is available for fill wallpapers but can <strong>only</strong> be used when working with <a href="/api/themes">themes »</a>.</li>
|
||||
</ul>
|
||||
<p>Wallpapers can also be installed in a specific chat, by using <a href="/method/messages.setChatWallPaper">messages.setChatWallPaper</a>: this will emit a <a href="/constructor/messageActionSetChatWallPaper">messageActionSetChatWallPaper</a> service message, displaying the wallpaper in the UI along with an invitation for the other user to apply the same wallpaper. </p>
|
||||
<p>If the other user decides to apply the same wallpaper to the chat, <a href="/method/messages.setChatWallPaper">messages.setChatWallPaper</a> should be invoked passing the wallpaper and wallpaper settings received in the <a href="/constructor/messageActionSetChatWallPaper">messageActionSetChatWallPaper</a> service message, along with the <code>id</code> of the <a href="/constructor/messageActionSetChatWallPaper">messageActionSetChatWallPaper</a> service message: this way, the action will emit a different <a href="/constructor/messageActionSetSameChatWallPaper">messageActionSetSameChatWallPaper</a>, which should be displayed in the UI as a simple acknowledgment service message, without the full wallpaper and without an invitation for the other user to apply it (since both participants just did that already). </p>
|
||||
<p>Note that unlike installWallpaper or saveWallpaper, <a href="/method/messages.setChatWallPaper">messages.setChatWallPaper</a> accepts <a href="#fill-wallpapers">fill wallpapers</a> just fine.</p></div>
|
||||
|
||||
</div>
|
||||
|
||||
|
|
|
@ -77,7 +77,7 @@
|
|||
<tr>
|
||||
<td><strong>for_chat</strong></td>
|
||||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.0?<a href="/constructor/true">true</a></td>
|
||||
<td> </td>
|
||||
<td>Set this flag when uploading wallpapers to be passed to <a href="/method/messages.setChatWallPaper">messages.setChatWallPaper</a>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>file</strong></td>
|
||||
|
@ -121,6 +121,7 @@
|
|||
</tbody>
|
||||
</table>
|
||||
<h3><a class="anchor" href="#related-pages" id="related-pages" name="related-pages"><i class="anchor-icon"></i></a>Related pages</h3>
|
||||
<h4><a class="anchor" href="#messagessetchatwallpaper" id="messagessetchatwallpaper" name="messagessetchatwallpaper"><i class="anchor-icon"></i></a><a href="/method/messages.setChatWallPaper">messages.setChatWallPaper</a></h4>
|
||||
<h4><a class="anchor" href="#wallpapers" id="wallpapers" name="wallpapers"><i class="anchor-icon"></i></a><a href="/api/wallpapers">Wallpapers</a></h4>
|
||||
<p>Telegram apps support generating, sharing and synchronizing chat backgrounds.</p></div>
|
||||
|
||||
|
|
|
@ -4,32 +4,24 @@
|
|||
<meta charset="utf-8">
|
||||
<title>messages.setChatWallPaper</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta property="description" content="Parameters
|
||||
<meta property="description" content="Set a custom wallpaper » in a specific private chat with another user.
|
||||
Parameters
|
||||
Name
|
||||
Type
|
||||
Description
|
||||
flags
|
||||
#
|
||||
Flags, see TL conditional fields
|
||||
peer
|
||||
InputPeer
|
||||
|
||||
wallpaper
|
||||
flags.0?InputWallPaper…">
|
||||
Flags, see…">
|
||||
<meta property="og:title" content="messages.setChatWallPaper">
|
||||
<meta property="og:image" content="">
|
||||
<meta property="og:description" content="Parameters
|
||||
<meta property="og:description" content="Set a custom wallpaper » in a specific private chat with another user.
|
||||
Parameters
|
||||
Name
|
||||
Type
|
||||
Description
|
||||
flags
|
||||
#
|
||||
Flags, see TL conditional fields
|
||||
peer
|
||||
InputPeer
|
||||
|
||||
wallpaper
|
||||
flags.0?InputWallPaper…">
|
||||
Flags, see…">
|
||||
<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">
|
||||
|
@ -64,7 +56,8 @@ flags.0?InputWallPaper…">
|
|||
<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="/methods" >All Methods</a></li><i class="icon icon-breadcrumb-divider"></i><li><a href="/method/messages.setChatWallPaper" >messages.setChatWallPaper</a></li></ul></div>
|
||||
<h1 id="dev_page_title">messages.setChatWallPaper</h1>
|
||||
|
||||
<div id="dev_page_content"><p><div class="clearfix">
|
||||
<div id="dev_page_content"><p>Set a custom <a href="/api/wallpapers">wallpaper »</a> in a specific private chat with another user.</p>
|
||||
<p><div class="clearfix">
|
||||
<ul class="dev_layer_select slightly-pull-right nav nav-pills">
|
||||
<li class="dropdown">
|
||||
<a class="dropdown-toggle" onclick="return dropdownClick(this, event)" href="#">Layer 158 <b class="caret"></b></a>
|
||||
|
@ -103,22 +96,22 @@ flags.0?InputWallPaper…">
|
|||
<tr>
|
||||
<td><strong>peer</strong></td>
|
||||
<td style="text-align: center;"><a href="/type/InputPeer">InputPeer</a></td>
|
||||
<td> </td>
|
||||
<td>The private chat where the wallpaper will be set</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>wallpaper</strong></td>
|
||||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.0?<a href="/type/InputWallPaper">InputWallPaper</a></td>
|
||||
<td> </td>
|
||||
<td>The <a href="/api/wallpapers">wallpaper »</a>, obtained as described in the <a href="/api/wallpapers#uploading-wallpapers">wallpaper documentation »</a> or from a <a href="/constructor/messageActionSetChatWallPaper">messageActionSetChatWallPaper</a> service message.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>settings</strong></td>
|
||||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.2?<a href="/type/WallPaperSettings">WallPaperSettings</a></td>
|
||||
<td> </td>
|
||||
<td>Wallpaper settings, obtained as described in the <a href="/api/wallpapers#uploading-wallpapers">wallpaper documentation »</a> or from <a href="/constructor/messageActionSetChatWallPaper">messageActionSetChatWallPaper</a>.<code>wallpaper</code>.<code>settings</code>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>id</strong></td>
|
||||
<td style="text-align: center;"><a href="/mtproto/TL-combinators#conditional-fields">flags</a>.1?<a href="/type/int">int</a></td>
|
||||
<td> </td>
|
||||
<td>If the wallpaper was obtained from a <a href="/constructor/messageActionSetChatWallPaper">messageActionSetChatWallPaper</a> service message, must contain the ID of that message.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
|
Loading…
Reference in a new issue