fix: preserve optimized hashtag ordering

This commit is contained in:
Lain Soykaf 2026-07-24 18:36:25 +04:00
commit b97092a97e
No known key found for this signature in database

View file

@ -901,10 +901,10 @@ defmodule Pleroma.Web.ActivityPub.ActivityPub do
where: hto.hashtag_id in ^hashtag_ids where: hto.hashtag_id in ^hashtag_ids
) )
if query.distinct == [] do if is_nil(query.distinct) do
from([activity, object] in query, from([_activity, object] in query,
distinct: [desc: activity.id], distinct: [desc: object.id],
order_by: [desc: activity.id] order_by: [desc: object.id]
) )
else else
query query