Hide muted theads from home/public timelines unless with_muted is set

This commit is contained in:
rinpatch 2019-08-15 17:37:30 +03:00
commit a4a3e3becd
5 changed files with 60 additions and 10 deletions

View file

@ -96,6 +96,7 @@ defmodule Pleroma.Activity do
from([a] in query,
left_join: tm in ThreadMute,
on: tm.user_id == ^user.id and tm.context == fragment("?->>'context'", a.data),
as: :thread_mute,
select: %Activity{a | thread_muted?: not is_nil(tm.id)}
)
end