This commit is contained in:
parent
de63f313a5
commit
159c151ae7
|
@ -408,7 +408,7 @@ async def load_reactions_by(_, info, by, limit=50, offset=0):
|
|||
|
||||
# sort if by stat is present
|
||||
if by.get("stat"):
|
||||
reactions = sorted(reactions, key=lambda r: r.stat.get(by["stat"]) or r.created_at)
|
||||
reactions = sorted(reactions, key=lambda r: r.stat.get(by["stat"]) or r.created_at, reverse=True)
|
||||
|
||||
return reactions
|
||||
|
||||
|
|
|
@ -13,22 +13,42 @@ enum ReactionStatus {
|
|||
}
|
||||
|
||||
enum ReactionKind {
|
||||
LIKE
|
||||
DISLIKE
|
||||
# collabs
|
||||
AGREE
|
||||
DISAGREE
|
||||
ASK
|
||||
PROPOSE
|
||||
PROOF
|
||||
DISPROOF
|
||||
COMMENT
|
||||
QUOTE
|
||||
PROPOSE
|
||||
ASK
|
||||
REMARK
|
||||
FOOTNOTE
|
||||
ACCEPT
|
||||
REJECT
|
||||
# public feed
|
||||
QUOTE
|
||||
COMMENT
|
||||
LIKE
|
||||
DISLIKE
|
||||
}
|
||||
|
||||
class ReactionKind(Enumeration):
|
||||
# TYPE = <reaction index> # rating diff
|
||||
|
||||
# editor mode
|
||||
AGREE = "AGREE" # +1
|
||||
DISAGREE = "DISAGREE" # -1
|
||||
ASK = "ASK" # +0
|
||||
PROPOSE = "PROPOSE" # +0
|
||||
PROOF = "PROOF" # +1
|
||||
DISPROOF = "DISPROOF" # -1
|
||||
ACCEPT = "ACCEPT" # +1
|
||||
REJECT = "REJECT" # -1
|
||||
|
||||
# public feed
|
||||
QUOTE = "QUOTE" # +0 TODO: use to bookmark in collection
|
||||
COMMENT = "COMMENT" # +0
|
||||
LIKE = "LIKE" # +1
|
||||
DISLIKE = "DISLIKE" # -1
|
||||
|
||||
|
||||
enum FollowingEntity {
|
||||
TOPIC
|
||||
AUTHOR
|
||||
|
|
Loading…
Reference in New Issue
Block a user