public void EditMessage(TLMessage message) { if (message == null) { return; } var inputPeer = With as IInputPeer; if (inputPeer == null) { return; } IsWorking = true; MTProtoService.GetMessageEditDataAsync(inputPeer.ToInputPeer(), message.Id, editData => Execute.BeginOnUIThread(() => { IsWorking = false; var text = GetMessageEditText(editData, message); StartEditMessage(text, message); }), error => Execute.BeginOnUIThread(() => { IsWorking = false; if (error.CodeEquals(ErrorCode.BAD_REQUEST)) { if (error.TypeEquals(ErrorType.MESSAGE_ID_INVALID)) { MessageBox.Show(AppResources.EditMessageError, AppResources.Error, MessageBoxButton.OK); return; } } Telegram.Api.Helpers.Execute.ShowDebugMessage("channel.getMessageEditData error " + error); })); }