update doc

This commit is contained in:
Wizou 2023-03-08 20:10:09 +01:00
parent 86796ebf0c
commit 22ea4c6de8
5 changed files with 10 additions and 9 deletions

2
.github/dev.yml vendored
View file

@ -2,7 +2,7 @@ pr: none
trigger: trigger:
- master - master
name: 3.2.3-dev.$(Rev:r) name: 3.3.1-dev.$(Rev:r)
pool: pool:
vmImage: ubuntu-latest vmImage: ubuntu-latest

2
.github/release.yml vendored
View file

@ -1,7 +1,7 @@
pr: none pr: none
trigger: none trigger: none
name: 3.2.$(Rev:r) name: 3.3.$(Rev:r)
pool: pool:
vmImage: ubuntu-latest vmImage: ubuntu-latest

View file

@ -160,10 +160,10 @@ foreach (var participant in participants.participants) // This is the better way
*Note: It is not possible to list only the Deleted Accounts. Those will be automatically removed by Telegram from your group after a while* *Note: It is not possible to list only the Deleted Accounts. Those will be automatically removed by Telegram from your group after a while*
<a name="history"></a> <a name="history"></a>
## Fetch all messages (history) from a chat ## Fetch all messages (history) from a chat/user
```csharp ```csharp
var chats = await client.Messages_GetAllChats(); var chats = await client.Messages_GetAllChats();
InputPeer peer = chats.chats[1234567890]; // the chat we want InputPeer peer = chats.chats[1234567890]; // the chat (or User) we want
for (int offset_id = 0; ;) for (int offset_id = 0; ;)
{ {
var messages = await client.Messages_GetHistory(peer, offset_id); var messages = await client.Messages_GetHistory(peer, offset_id);
@ -180,6 +180,7 @@ for (int offset_id = 0; ;)
} }
``` ```
Notes: Notes:
- `peer` can also be a User, obtained through methods like [`Messages_GetAllDialogs`](#list-dialogs)
- To stop at a specific msg ID, use Messages_GetHistory `min_id` argument. For example, `min_id: dialog.read_inbox_max_id` - To stop at a specific msg ID, use Messages_GetHistory `min_id` argument. For example, `min_id: dialog.read_inbox_max_id`
- To mark the message history as read, use: `await client.ReadHistory(peer);` - To mark the message history as read, use: `await client.ReadHistory(peer);`

2
FAQ.md
View file

@ -202,7 +202,7 @@ If Telegram servers decide to shutdown this secondary connection, it's not an is
This should be transparent and pending API calls should automatically be resent upon reconnection. This should be transparent and pending API calls should automatically be resent upon reconnection.
You can choose to increase `MaxAutoReconnects` if it happens too often because your Internet connection is unstable. You can choose to increase `MaxAutoReconnects` if it happens too often because your Internet connection is unstable.
3) If you reach `MaxAutoReconnects` disconnections, then the **OnUpdate** event handler will receive a `ReactorError` object to notify you of the problem. 3) If you reach `MaxAutoReconnects` disconnections, then the **OnUpdate** event handler will receive a `ReactorError` object to notify you of the problem,
and pending API calls throw the network IOException. and pending API calls throw the network IOException.
In this case, the recommended action would be to dispose the client and recreate one In this case, the recommended action would be to dispose the client and recreate one

View file

@ -114,17 +114,17 @@ namespace TL
/// <summary>Object defines a contact from the user's phone book. <para>See <a href="https://corefork.telegram.org/type/InputContact"/></para> <para>Derived classes: <see cref="InputPhoneContact"/></para></summary> /// <summary>Object defines a contact from the user's phone book. <para>See <a href="https://corefork.telegram.org/type/InputContact"/></para> <para>Derived classes: <see cref="InputPhoneContact"/></para></summary>
public abstract class InputContact : IObject { } public abstract class InputContact : IObject { }
/// <summary>Phone contact. The <c>client_id</c> is just an arbitrary contact ID: it should be set, for example, to an incremental number when using <see cref="SchemaExtensions.Contacts_ImportContacts">Contacts_ImportContacts</see>, in order to retry importing only the contacts that weren't imported successfully. <para>See <a href="https://corefork.telegram.org/constructor/inputPhoneContact"/></para></summary> /// <summary>Phone contact. <para>See <a href="https://corefork.telegram.org/constructor/inputPhoneContact"/></para></summary>
[TLDef(0xF392B7F4)] [TLDef(0xF392B7F4)]
public class InputPhoneContact : InputContact public class InputPhoneContact : InputContact
{ {
/// <summary>User identifier on the client</summary> /// <summary>An arbitrary 64-bit integer: it should be set, for example, to an incremental number when using <see cref="SchemaExtensions.Contacts_ImportContacts">Contacts_ImportContacts</see>, in order to retry importing only the contacts that weren&#39;t imported successfully, according to the client_ids returned in <see cref="Contacts_ImportedContacts"/>.<c>retry_contacts</c>.</summary>
public long client_id; public long client_id;
/// <summary>Phone number</summary> /// <summary>Phone number</summary>
public string phone; public string phone;
/// <summary>Contact's first name</summary> /// <summary>Contact&#39;s first name</summary>
public string first_name; public string first_name;
/// <summary>Contact's last name</summary> /// <summary>Contact&#39;s last name</summary>
public string last_name; public string last_name;
} }