mirror of
https://github.com/wiz0u/WTelegramClient.git
synced 2025-12-06 06:52:01 +01:00
update doc
This commit is contained in:
parent
86796ebf0c
commit
22ea4c6de8
2
.github/dev.yml
vendored
2
.github/dev.yml
vendored
|
|
@ -2,7 +2,7 @@ pr: none
|
|||
trigger:
|
||||
- master
|
||||
|
||||
name: 3.2.3-dev.$(Rev:r)
|
||||
name: 3.3.1-dev.$(Rev:r)
|
||||
|
||||
pool:
|
||||
vmImage: ubuntu-latest
|
||||
|
|
|
|||
2
.github/release.yml
vendored
2
.github/release.yml
vendored
|
|
@ -1,7 +1,7 @@
|
|||
pr: none
|
||||
trigger: none
|
||||
|
||||
name: 3.2.$(Rev:r)
|
||||
name: 3.3.$(Rev:r)
|
||||
|
||||
pool:
|
||||
vmImage: ubuntu-latest
|
||||
|
|
|
|||
|
|
@ -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*
|
||||
|
||||
<a name="history"></a>
|
||||
## Fetch all messages (history) from a chat
|
||||
## Fetch all messages (history) from a chat/user
|
||||
```csharp
|
||||
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; ;)
|
||||
{
|
||||
var messages = await client.Messages_GetHistory(peer, offset_id);
|
||||
|
|
@ -180,6 +180,7 @@ for (int offset_id = 0; ;)
|
|||
}
|
||||
```
|
||||
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 mark the message history as read, use: `await client.ReadHistory(peer);`
|
||||
|
||||
|
|
|
|||
2
FAQ.md
2
FAQ.md
|
|
@ -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.
|
||||
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.
|
||||
In this case, the recommended action would be to dispose the client and recreate one
|
||||
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
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)]
|
||||
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't imported successfully, according to the client_ids returned in <see cref="Contacts_ImportedContacts"/>.<c>retry_contacts</c>.</summary>
|
||||
public long client_id;
|
||||
/// <summary>Phone number</summary>
|
||||
public string phone;
|
||||
/// <summary>Contact's first name</summary>
|
||||
/// <summary>Contact's first name</summary>
|
||||
public string first_name;
|
||||
/// <summary>Contact's last name</summary>
|
||||
/// <summary>Contact's last name</summary>
|
||||
public string last_name;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue