public FeedPostComment SaveFeedPostComment(FeedPostComment comment) { comment.PostedDateTime = DateTime.Now; FeedPostComment newComment = new FeedPostCommentDA().Insert(comment); FeedClimbingPost post = new FeedClimbingPostDA().GetByID(comment.FeedPostID); //-- Send notification to the poster FeedSettings postersFeedSettings = GetUsersFeedViewSettings(post.UserID); if (postersFeedSettings.NotifyOnPostComment && comment.UserID != post.UserID) { MailMan.SendCommentOnMyFeedPostNotification(post.ID, comment.User, post.User, comment.Message); } List <Guid> uniqueCommentingUserIDs = (from c in post.Comments where c.UserID != post.UserID select c.UserID).Distinct().ToList(); //-- Send notifications to other commentors foreach (Guid userID in uniqueCommentingUserIDs) { FeedSettings commentorsFeedSettings = GetUsersFeedViewSettings(userID); if (commentorsFeedSettings.NotifyOnPostsICommentedOn && comment.UserID != userID) { MailMan.SendCommentOnAFeedPostICommentedOnNotification(post.ID, comment.User, post.User, CFDataCache.GetClimberFromCache(userID), comment.Message); } } return(newComment); }