public async Task <DeleteMessageResponse> Handle(DeleteMessageRequest request, CancellationToken cancellationToken) { if (await messenger.Delete(request.MessageId)) { await hubManager.Invoke(SignalrActions.ON_MESSAGE_DELETED, request.RecipientId, request.MessageId); return(new DeleteMessageResponse()); } throw new CrudException("Message has not been deleted"); }