Fix reaction ordering

This commit is contained in:
Rafael Silva 2025-01-13 18:56:40 -03:00
parent 5fa624a0e7
commit b6b36f9e4a
No known key found for this signature in database

View File

@ -84,7 +84,7 @@ module DiscourseRewind
end
def sort_and_limit(reactions)
reactions.sort_by { |_, v| v }.first(5).to_h
reactions.sort_by { |_, v| -v }.first(5).reverse.to_h
end
end
end