Notification emails #80
@ -8,7 +8,7 @@ from abuse.models import AbuseReport
|
||||
from constants.activity import Verb
|
||||
from constants.base import (
|
||||
ABUSE_TYPE_EXTENSION,
|
||||
ABUSE_TYPE_REVIEW,
|
||||
ABUSE_TYPE_RATING,
|
||||
ABUSE_TYPE_USER,
|
||||
)
|
||||
|
||||
@ -30,8 +30,8 @@ def _create_action_from_report(
|
||||
|
||||
if instance.type == ABUSE_TYPE_EXTENSION:
|
||||
verb = Verb.REPORTED_EXTENSION
|
||||
elif instance.type == ABUSE_TYPE_REVIEW:
|
||||
verb = Verb.REPORTED_REVIEW
|
||||
elif instance.type == ABUSE_TYPE_RATING:
|
||||
verb = Verb.REPORTED_RATING
|
||||
elif instance.type == ABUSE_TYPE_USER:
|
||||
# TODO?
|
||||
return
|
||||
|
@ -7,7 +7,7 @@ class Verb:
|
||||
COMMENTED = 'commented'
|
||||
RATED_EXTENSION = 'rated extension'
|
||||
REPORTED_EXTENSION = 'reported extension'
|
||||
REPORTED_REVIEW = 'reported review'
|
||||
REPORTED_RATING = 'reported rating'
|
||||
REQUESTED_CHANGES = 'requested changes'
|
||||
REQUESTED_REVIEW = 'requested review'
|
||||
|
||||
|
@ -15,7 +15,7 @@ VERB2FLAGS = {
|
||||
Verb.COMMENTED: [Flag.AUTHOR, Flag.MODERATOR, Flag.REVIEWER],
|
||||
Verb.RATED_EXTENSION: [Flag.AUTHOR],
|
||||
Verb.REPORTED_EXTENSION: [Flag.MODERATOR],
|
||||
Verb.REPORTED_REVIEW: [Flag.MODERATOR],
|
||||
Verb.REPORTED_RATING: [Flag.MODERATOR],
|
||||
Verb.REQUESTED_CHANGES: [Flag.AUTHOR, Flag.MODERATOR, Flag.REVIEWER],
|
||||
Verb.REQUESTED_REVIEW: [Flag.MODERATOR, Flag.REVIEWER],
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user