From 6d811bcb14eb7199452d2673a6c30412989f7498 Mon Sep 17 00:00:00 2001 From: 6543 <6543@obermui.de> Date: Wed, 18 Dec 2019 14:07:36 +0100 Subject: Hide not allowed Reactions (#9387) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Hide not allowed Reactions * filter in query :D * use ` Co-Authored-By: Alexey 〒erentyev * update xorm v0.8.0 -> v0.8.1 --- models/issue_reaction.go | 1 + 1 file changed, 1 insertion(+) (limited to 'models/issue_reaction.go') diff --git a/models/issue_reaction.go b/models/issue_reaction.go index b4f332a089..6896eeeafc 100644 --- a/models/issue_reaction.go +++ b/models/issue_reaction.go @@ -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) } -- cgit v1.2.3