Ejemplo n.º 1
0
        private void SetCommenter(Commenter commenter, bool isSpamComment)
        {
            if (_requestValues.IsAuthenticated)
            {
                return;
            }

            _commentInput.MapPropertiesToInstance(commenter);
            commenter.IsTrustedCommenter = isSpamComment == false;

            if (isSpamComment)
            {
                commenter.NumberOfSpamComments++;
            }

            DocumentSession.Store(commenter);
        }
Ejemplo n.º 2
0
        private void SetCommenter(Commenter commenter, PostComments.Comment comment)
        {
            if (requestValues.IsAuthenticated)
            {
                return;
            }

            commentInput.MapPropertiesToInstance(commenter);
            commenter.IsTrustedCommenter = comment.IsSpam == false;

            if (comment.IsSpam)
            {
                commenter.NumberOfSpamComments++;
            }

            DocumentSession.Store(commenter);
            comment.CommenterId = commenter.Id;
        }