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