This commit is contained in:
@@ -1,20 +1,31 @@
|
||||
from orm.reaction import ReactionKind
|
||||
|
||||
|
||||
PROPOSAL_REACTIONS = [
|
||||
ReactionKind.ACCEPT.value,
|
||||
ReactionKind.REJECT.value,
|
||||
ReactionKind.AGREE.value,
|
||||
ReactionKind.DISAGREE.value,
|
||||
ReactionKind.ASK.value,
|
||||
ReactionKind.PROPOSE.value,
|
||||
]
|
||||
|
||||
PROOF_REACTIONS = [
|
||||
ReactionKind.PROOF.value,
|
||||
ReactionKind.DISPROOF.value
|
||||
]
|
||||
|
||||
RATING_REACTIONS = [
|
||||
ReactionKind.LIKE.value,
|
||||
ReactionKind.ACCEPT.value,
|
||||
ReactionKind.AGREE.value,
|
||||
ReactionKind.DISLIKE.value,
|
||||
ReactionKind.REJECT.value,
|
||||
ReactionKind.DISAGREE.value,
|
||||
ReactionKind.DISLIKE.value
|
||||
]
|
||||
|
||||
|
||||
def is_negative(x):
|
||||
return x in [
|
||||
ReactionKind.ACCEPT.value,
|
||||
ReactionKind.LIKE.value,
|
||||
ReactionKind.PROOF.value,
|
||||
ReactionKind.DISLIKE.value,
|
||||
ReactionKind.DISPROOF.value,
|
||||
ReactionKind.REJECT.value,
|
||||
]
|
||||
|
||||
|
||||
|
@@ -14,11 +14,13 @@ class ReactionKind(Enumeration):
|
||||
DISAGREE = 'DISAGREE' # -1
|
||||
ASK = 'ASK' # +0
|
||||
PROPOSE = 'PROPOSE' # +0
|
||||
PROOF = 'PROOF' # +1
|
||||
DISPROOF = 'DISPROOF' # -1
|
||||
ACCEPT = 'ACCEPT' # +1
|
||||
REJECT = 'REJECT' # -1
|
||||
|
||||
# expert mode
|
||||
PROOF = 'PROOF' # +1
|
||||
DISPROOF = 'DISPROOF' # -1
|
||||
|
||||
# public feed
|
||||
QUOTE = 'QUOTE' # +0 TODO: use to bookmark in collection
|
||||
COMMENT = 'COMMENT' # +0
|
||||
|
Reference in New Issue
Block a user