protected override async void SendExecute() { var config = CacheService.GetConfig(); if (config == null) { return; } var peers = new TLVector <TLInputUserBase>(SelectedItems.Select(x => x.ToInputUser())); if (peers.Count <= config.ChatSizeMax) { // Classic chat var response = await ProtoService.CreateChatAsync(peers, _title); if (response.IsSucceeded) { var updates = response.Result as TLUpdates; if (updates != null) { CacheService.SyncUsersAndChats(updates.Users, updates.Chats, tuple => { }); var chat = updates.Chats.FirstOrDefault() as TLChat; if (chat != null) { if (_photo != null) { var edit = await ProtoService.EditChatPhotoAsync(chat.Id, new TLInputChatUploadedPhoto { File = _photo }); if (edit.IsSucceeded) { } else { } } NavigationService.NavigateToDialog(chat); NavigationService.RemoveLast(); NavigationService.RemoveLast(); } } } else { Execute.ShowDebugMessage("messages.createChat error " + response.Error); } } else { } }