WTelegramClientHelperGetChannelMessages Method

Asynchronously retrieves messages from the specified channel.

Definition

Namespace: DevCase.ThirdParty.WTelegramClient
Assembly: DevCase.net48.ThirdParty.WTelegramClient (in DevCase.net48.ThirdParty.WTelegramClient.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
public static Task<List<MessageData>> GetChannelMessages(
	Client client,
	Channel fromChannel,
	int fromTopicId,
	long fromUserId,
	bool onlyMediaMessages,
	bool ascendingMessageOrder,
	Action<int, MessageData> progressCallBack = null
)

Parameters

client  Client
The source Client object.
fromChannel  Channel
The channel from which to retrieve messages.
fromTopicId  Int32
If fromChannel is a group, this value indicates the identifier of the topic from which to retrieve messages.

If this value is null and fromChannel is a group, all messages from all topics will be retrieved.

fromUserId  Int64
The identifier of the user for which to retrieve their messages in the provided channel.

If this value is null (zero), all messages from all users will be retrieved.

onlyMediaMessages  Boolean
If True, only retrieves messages containing media (such as direct download files, urls, photos, etc); If False, it also retrieves plain text messages.
ascendingMessageOrder  Boolean
Determines whether the messages should be ordered in ascending order (oldest message = first).
progressCallBack  ActionInt32, MessageData  (Optional)
Optional. An action callback for progress updates, providing the number of fetched messages and the associated topic-message data.

Return Value

TaskListMessageData
An asynchronous operation that yields a ListT containing the retrieved messages from the provided channel.

Example

This is a code example that demonstrates how to fetch all messages from chat or channel.
C#
No code example is currently available or this language may not be supported.

See Also