add implicit conversion for Peer (#229)

This commit is contained in:
Ali 2024-01-16 17:25:51 +03:30 committed by GitHub
parent 48a1322452
commit 91a8eab86a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -128,6 +128,7 @@ namespace TL
{ {
public abstract long ID { get; } public abstract long ID { get; }
protected internal abstract IPeerInfo UserOrChat(Dictionary<long, User> users, Dictionary<long, ChatBase> chats); protected internal abstract IPeerInfo UserOrChat(Dictionary<long, User> users, Dictionary<long, ChatBase> chats);
public static implicit operator long(Peer peer) => peer.ID;
} }
partial class PeerUser partial class PeerUser
{ {