Committer: afedorov
LJSUP-13431: Antispam for edited entries in the communitiesU trunk/cgi-bin/ljprotocol.pl
Modified: trunk/cgi-bin/ljprotocol.pl =================================================================== --- trunk/cgi-bin/ljprotocol.pl 2012-09-27 08:30:21 UTC (rev 22988) +++ trunk/cgi-bin/ljprotocol.pl 2012-09-27 10:19:15 UTC (rev 22989) @@ -3152,8 +3152,11 @@ return $res if $res->{type}; } - # don't moderate admins, moderators & pre-approved users - unless ( LJ::RelationService->is_relation_type_to( $ownerid, $posterid, [ 'A','M','N' ] ) ) { + # don't moderate admins, moderators, pre-approved users & unsuspicious users + my $is_unsuspicious_user = 0; + LJ::run_hook('is_unsuspicious_user', $posterid, \$is_unsuspicious_user); + my $is_approved = LJ::RelationService->is_relation_type_to( $ownerid, $posterid, [ 'A','M','N' ] ); + unless ( $is_unsuspicious_user || $is_approved ) { my $need_moderated = 0; my $suspicious_list = [];