TLSharp
TLSharp copied to clipboard
Read messages from user chat (not channel)
Hello, I am successfully listing the channels and read their messages with the following code:
TLChannel chatFromDialogs = dialogs.Chats.OfType<TLChannel>().FirstOrDefault(c => c.Title == chatTitle);
var channel = chatFromDialogs;
var chatPeer = new TLInputPeerChannel()
{
ChannelId = channel.Id,
AccessHash = channel.AccessHash.Value
};
var msgs = (TLChannelMessages)(await client.GetHistoryAsync(chatPeer, offsetId: 0, limit: 5));
However, for a single users, the chats are not listed as TLChannel, but I can see the list of users at dialogs.Users. How to get then the messages from a user chat?
Thank you