public IActionResult PostComment(CommentDTO commentDto) { var tenant = Util.Util.GetSubdomain(HttpContext.Request.Host.ToString()); IdeationReply ideationReply = _ideationManager.GetIdeationReply(commentDto.IdeationReplyId); User user = _usermanager.GetUserAsync(User).Result; Comment comment = _ideationManager.AddComment(commentDto.CommentText, user, ideationReply); // Create activity var activity = CreateActivity(ActivityType.Comment, user); activity.Comment = comment; _activityManager.AddActivity(activity); // Save everything _unitOfWorkManager.Save(); // Push activity var activityVm = new ActivityViewModel(activity); PushWebsockets(activityVm).Wait(); //Fill in data to send back as response commentDto.CommentId = comment.CommentId; commentDto.DateTime = comment.Created.FormatParasableDate(); commentDto.UserDisplayName = comment.User.GetDisplayName(); commentDto.UserName = comment.User.UserName; if (user != null && _usermanager.IsUserModOrAbove(user, tenant)) { //Mods can see the full name commentDto.UserFullName = comment.User.GetFullName(); } return(Ok(commentDto)); }