public virtual async Task <IActionResult> BlogCommentAdd(int blogPostId, BlogPostModel model, bool captchaValid)
        {
            if (!_blogSettings.Enabled)
            {
                return(RedirectToRoute("Homepage"));
            }

            var blogPost = await _blogService.GetBlogPostByIdAsync(blogPostId);

            if (blogPost == null || !blogPost.AllowComments)
            {
                return(RedirectToRoute("Homepage"));
            }

            if (await _customerService.IsGuestAsync(await _workContext.GetCurrentCustomerAsync()) && !_blogSettings.AllowNotRegisteredUsersToLeaveComments)
            {
                ModelState.AddModelError("", await _localizationService.GetResourceAsync("Blog.Comments.OnlyRegisteredUsersLeaveComments"));
            }

            //validate CAPTCHA
            if (_captchaSettings.Enabled && _captchaSettings.ShowOnBlogCommentPage && !captchaValid)
            {
                ModelState.AddModelError("", await _localizationService.GetResourceAsync("Common.WrongCaptchaMessage"));
            }

            if (ModelState.IsValid)
            {
                var comment = new BlogComment
                {
                    BlogPostId   = blogPost.Id,
                    CustomerId   = (await _workContext.GetCurrentCustomerAsync()).Id,
                    CommentText  = model.AddNewComment.CommentText,
                    IsApproved   = !_blogSettings.BlogCommentsMustBeApproved,
                    StoreId      = (await _storeContext.GetCurrentStoreAsync()).Id,
                    CreatedOnUtc = DateTime.UtcNow,
                };

                await _blogService.InsertBlogCommentAsync(comment);

                //notify a store owner
                if (_blogSettings.NotifyAboutNewBlogComments)
                {
                    await _workflowMessageService.SendBlogCommentNotificationMessageAsync(comment, _localizationSettings.DefaultAdminLanguageId);
                }

                //activity log
                await _customerActivityService.InsertActivityAsync("PublicStore.AddBlogComment",
                                                                   await _localizationService.GetResourceAsync("ActivityLog.PublicStore.AddBlogComment"), comment);

                //raise event
                if (comment.IsApproved)
                {
                    await _eventPublisher.PublishAsync(new BlogCommentApprovedEvent(comment));
                }

                //The text boxes should be cleared after a comment has been posted
                //That' why we reload the page
                TempData["nop.blog.addcomment.result"] = comment.IsApproved
                    ? await _localizationService.GetResourceAsync("Blog.Comments.SuccessfullyAdded")
                    : await _localizationService.GetResourceAsync("Blog.Comments.SeeAfterApproving");

                return(RedirectToRoute("BlogPost", new { SeName = await _urlRecordService.GetSeNameAsync(blogPost, blogPost.LanguageId, ensureTwoPublishedLanguages: false) }));
            }

            //If we got this far, something failed, redisplay form
            await _blogModelFactory.PrepareBlogPostModelAsync(model, blogPost, true);

            return(View(model));
        }