mirror of
https://github.com/wiz0u/WTelegramClient.git
synced 2026-04-04 14:07:41 +00:00
Upgrade to layer 133
This commit is contained in:
parent
c727f75380
commit
77a44a86a6
2 changed files with 5 additions and 5 deletions
|
|
@ -30,10 +30,10 @@ namespace WTelegramClientTest
|
|||
}
|
||||
|
||||
|
||||
private static readonly Dictionary<int, UserBase> users = new();
|
||||
private static readonly Dictionary<int, ChatBase> chats = new();
|
||||
private static string AUser(int user_id) => users.TryGetValue(user_id, out var user) ? user.DisplayName : $"User {user_id}";
|
||||
private static string AChat(int chat_id) => chats.TryGetValue(chat_id, out var chat) ? chat.Title : $"Chat {chat_id}";
|
||||
private static readonly Dictionary<long, UserBase> users = new();
|
||||
private static readonly Dictionary<long, ChatBase> chats = new();
|
||||
private static string AUser(long user_id) => users.TryGetValue(user_id, out var user) ? user.DisplayName : $"User {user_id}";
|
||||
private static string AChat(long chat_id) => chats.TryGetValue(chat_id, out var chat) ? chat.Title : $"Chat {chat_id}";
|
||||
private static string APeer(Peer peer) => peer is null ? null : peer is PeerUser user ? AUser(user.user_id)
|
||||
: peer is PeerChat chat ? AChat(chat.chat_id) : peer is PeerChannel channel ? AChat(channel.channel_id) : $"Peer {peer.ID}";
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue