public async Task <IHttpActionResult> AddCommentToWish(AddCommentToWishDto model) { var userId = long.Parse(User.Identity.GetUserId()); var insertedComment = await _commentRepository.AddCommentToWish(model.WishId, userId, model.Text, model.ParentCommentId); await _notificationService.SentNotificationToQueue(new AddCommentQueueNotification() { TargetType = "wish", TargetId = model.WishId, CreatorId = userId, CommentId = insertedComment.Id }); if (model.ParentCommentId != null) { //Если это ответ к комменту то шлём юзеру владельцу коммента await _notificationService.SentNotificationToQueue(new AddCommentQueueNotification() { TargetType = "wish", TargetId = model.WishId, CreatorId = userId, CommentId = insertedComment.Id }); } return(SuccessApiResult(insertedComment)); }