Skip to content

armgit / fider

Public Imported from GitHub
0

Open platform to collect and prioritize feedback

Sort the reactions by count

Matt Roberts35ddba8c94c6
diff --git a/app/services/sqlstore/postgres/comment.go b/app/services/sqlstore/postgres/comment.go
index 74e238794..eaaa17d73 100644
--- a/app/services/sqlstore/postgres/comment.go
+++ b/app/services/sqlstore/postgres/comment.go
@@ -195,7 +195,7 @@ func getCommentsByPost(ctx context.Context, q *query.GetCommentsByPost) error {
'emoji', emoji,
'count', count,
'includesMe', CASE WHEN $3 = ANY(user_ids) THEN true ELSE false END
- )) as reaction_counts
+ ) ORDER BY count DESC) as reaction_counts
FROM (
SELECT
comment_id,