fix crash
This commit is contained in:
parent
3f593517e1
commit
3a4cb9e025
|
@ -287,10 +287,8 @@ namespace telegram {
|
|||
if (results.ChatIds.Length == 0)
|
||||
return 0;
|
||||
|
||||
return results.ChatIds.Select(GetChat)
|
||||
.Where(p => p.Type is ChatType.ChatTypePrivate)
|
||||
.Select(p => ((ChatType.ChatTypePrivate) p.Type).UserId)
|
||||
.First();
|
||||
var output = results.ChatIds.Select(GetChat).Where(p => p.Type is ChatType.ChatTypePrivate).Select(p => ((ChatType.ChatTypePrivate) p.Type).UserId);
|
||||
return output.Any() ? output.First() : 0;
|
||||
}
|
||||
|
||||
public static int SearchContacts(string query) {
|
||||
|
|
Loading…
Reference in a new issue