Skip to content

Commit 1d11228

Browse files
committed
checks whether comment was made by curator
1 parent 273edde commit 1d11228

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/tasks/spam.rake

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ namespace :spam do
1919

2020
def find_spam(items)
2121
items = items.select do |item|
22+
return false if item.user.curator || item.user.admin
23+
2224
summary = item.summary
2325
uris = extract_uris(summary)
2426
uris.length.positive?
@@ -39,5 +41,8 @@ namespace :spam do
3941

4042
topic_comments = find_spam(TopicComment.all)
4143
topic_comments.delete_all if topic_comments.length.positive?
44+
45+
service_comments = find_spam(ServiceComment.all)
46+
service_comments.delete_all if service_comments.length.positive?
4247
end
4348
end

0 commit comments

Comments
 (0)