Hide not allowed Reactions (#9387)

* Hide not allowed Reactions

* filter in query :D

* use `

Co-Authored-By: Alexey 〒erentyev <axifnx@gmail.com>

* update xorm v0.8.0 -> v0.8.1
This commit is contained in:
6543 2019-12-18 14:07:36 +01:00 committed by Lunny Xiao
parent 3b4682e172
commit 6d811bcb14
10 changed files with 156 additions and 478 deletions

View file

@ -69,6 +69,7 @@ func findReactions(e Engine, opts FindReactionsOptions) ([]*Reaction, error) {
reactions := make([]*Reaction, 0, 10)
sess := e.Where(opts.toConds())
return reactions, sess.
In("reaction.`type`", setting.UI.Reactions).
Asc("reaction.issue_id", "reaction.comment_id", "reaction.created_unix", "reaction.id").
Find(&reactions)
}