File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -38,11 +38,6 @@ public TimeSpan Timeout
3838 set => _httpClient . Timeout = value ;
3939 }
4040
41- #region For testing purposes
42- internal string BaseRequestUrl => _options . BaseRequestUrl ;
43- internal string BaseFileUrl => _options . BaseFileUrl ;
44- #endregion
45-
4641#pragma warning disable CS1591
4742 public delegate Task OnUpdateHandler ( Update update ) ;
4843 public delegate Task OnMessageHandler ( Message message , UpdateType type ) ;
Original file line number Diff line number Diff line change @@ -65,6 +65,10 @@ public ChatId(string username)
6565 [ return : NotNullIfNotNull ( nameof ( chatFullInfo ) ) ]
6666 public static implicit operator ChatId ? ( ChatFullInfo ? chatFullInfo ) => chatFullInfo is null ? null : new ( chatFullInfo . Id ) ;
6767
68+ /// <summary>Convert a <see cref="User"/> object to a <see cref="ChatId"/></summary>
69+ [ return : NotNullIfNotNull ( nameof ( user ) ) ]
70+ public static implicit operator ChatId ? ( User ? user ) => user is null ? null : new ( user . Id ) ;
71+
6872 /// <summary>Compares two ChatId objects</summary>
6973 public static bool operator == ( ChatId ? obj1 , ChatId ? obj2 )
7074 {
You can’t perform that action at this time.
0 commit comments