activitypub: help ecto build a better query for thread mute filtering

using an indexed value in thread_mute table helps ecto build a better query.
This commit is contained in:
Ariadne Conill 2019-09-06 23:11:26 +00:00
parent 130bc8e0d5
commit 5effb2cbca

View File

@ -796,7 +796,7 @@ defmodule Pleroma.Web.ActivityPub.ActivityPub do
)
unless opts["skip_preload"] do
from([thread_mute: tm] in query, where: is_nil(tm))
from([thread_mute: tm] in query, where: is_nil(tm.user_id))
else
query
end