mirror of
https://github.com/MarshalX/telegram-crawler.git
synced 2025-01-05 18:38:19 +01:00
Update content of files
This commit is contained in:
parent
95e108ebf7
commit
2afd12cdd0
2 changed files with 14 additions and 1 deletions
|
@ -82,7 +82,6 @@ If the <code>hidden</code> flag is set it should not be displayed as an option t
|
|||
<p>Use <a href="/method/account.updateColor">account.updateColor</a> to update the color palette of the current account's message accents and/or profile page; note that the current account must be subscribed to <a href="/api/premium">Telegram Premium</a> in order to call the method.<br>
|
||||
Use <a href="/method/channels.updateColor">channels.updateColor</a> to update the color palette of the channel's message/profile page accents.</p>
|
||||
<p>Note that channels can use a palette only after reaching at least the <a href="/api/boost">boost level</a> specified in the <code>channel_min_level</code> field of the <a href="/constructor/help.peerColorOption">help.peerColorOption</a> constructor for the chosen palette: this is the only limitation for channel message accent palettes, while to change profile palettes, channels must <strong>also</strong> reach at least the <a href="/api/boost">boost level</a> specified in the <a href="/api/config#channel-bg-icon-level-min"><code>channel_profile_bg_icon_level_min</code> config parameter</a>. </p>
|
||||
<p>To use emojis in message/profile channel palettes, channels must have reached at least the <a href="/api/boost">boost level</a> specified <a href="/api/config#channel-bg-icon-level-min"><code>channel_bg_icon_level_min</code> config parameter</a>/<a href="/api/config#channel-bg-icon-level-min"><code>channel_profile_bg_icon_level_min</code> config parameter</a>, respectively. </p>
|
||||
<p>The chosen message accent palette will be visible to other users in the <a href="/constructor/channel">channel</a>.<code>color</code> and <a href="/constructor/user">user</a>.<code>color</code> fields. </p>
|
||||
<p>The chosen user and channel profile palettes will be visible in the <a href="/constructor/user">user</a>.<code>profile_color</code> and <a href="/constructor/channel">channel</a>.<code>profile_color</code> fields.</p></div>
|
||||
|
||||
|
|
|
@ -111,6 +111,20 @@ To add new dialogs to the saved dialog list, simply forward messages from any no
|
|||
</li>
|
||||
</ul>
|
||||
<p>Saving messages from private chats with users with forward privacy enabled will add them to a saved dialog entry of a special anonymous user with <code>id=2666000</code>. </p>
|
||||
<p>Clients may use the following pseudocode to manually populate the <code>saved_peer_id</code> of old <code>layer < 170</code> <a href="/constructor/message">message</a>s stored in the <strong>local</strong> database. </p>
|
||||
<pre><code>// user_id is the ID of the current user.
|
||||
|
||||
if (message.peer_id == user_id) {
|
||||
if (message.fwd_from.saved_from_peer) {
|
||||
message.saved_peer_id = message.fwd_from.saved_from_peer
|
||||
} elseif (message.fwd_from.from_id) {
|
||||
<a href='/constructor/message.saved_peer_id'>message.saved_peer_id</a> = <a href='/constructor/user_id'>user_id</a>;
|
||||
} elseif (message.fwd_from.from_name) {
|
||||
<a href='/constructor/message.saved_peer_id'>message.saved_peer_id</a> = <a href='/type/2666000'>2666000</a>;
|
||||
} else {
|
||||
<a href='/constructor/message.saved_peer_id'>message.saved_peer_id</a> = <a href='/constructor/user_id'>user_id</a>;
|
||||
}
|
||||
}</code></pre>
|
||||
<p>Sending (not forwarding from another dialog) new messages directly to ourselves will add them to a saved dialog entry with ourselves. </p>
|
||||
<p>A set of methods can then be used to obtain this dialog list, pin/unpin dialogs inside of it, view and remove messages from saved dialogs: <a href="/method/messages.getSavedDialogs">messages.getSavedDialogs</a>, <a href="/method/messages.getSavedHistory">messages.getSavedHistory</a>, <a href="/method/messages.deleteSavedHistory">messages.deleteSavedHistory</a>, <a href="/method/messages.getPinnedSavedDialogs">messages.getPinnedSavedDialogs</a>, <a href="/method/messages.toggleSavedDialogPin">messages.toggleSavedDialogPin</a>, <a href="/method/messages.reorderPinnedSavedDialogs">messages.reorderPinnedSavedDialogs</a> work just like their counterparts <a href="/method/messages.getDialogs">messages.getDialogs</a>, <a href="/method/messages.getHistory">messages.getHistory</a>, <a href="/method/messages.deleteHistory">messages.deleteHistory</a>, <a href="/method/messages.getPinnedDialogs">messages.getPinnedDialogs</a>, <a href="/method/messages.toggleDialogPin">messages.toggleDialogPin</a>, <a href="/method/messages.reorderPinnedDialogs">messages.reorderPinnedDialogs</a>, with the sole difference that they affect the saved dialog list, instead of the main dialog list. </p>
|
||||
<p>To search for messages within a saved dialog, use the usual <a href="/method/messages.search">messages.search</a>, <a href="/method/messages.getSearchCounters">messages.getSearchCounters</a>, <a href="/method/messages.getSearchResultsCalendar">messages.getSearchResultsCalendar</a>, <a href="/method/messages.getSearchResultsPositions">messages.getSearchResultsPositions</a> methods with <code>peer</code>=<a href="/constructor/inputPeerSelf">inputPeerSelf</a> and <code>saved_peer_id</code>=id of the saved dialog.</p></div>
|
||||
|
|
Loading…
Reference in a new issue