Fix order of args for thread_muted?/2
This commit is contained in:
parent
4601473aaf
commit
8127e0d8cc
6 changed files with 12 additions and 12 deletions
|
|
@ -734,7 +734,7 @@ defmodule Pleroma.Notification do
|
|||
|
||||
def mark_as_read?(activity, target_user) do
|
||||
user = Activity.user_actor(activity)
|
||||
User.mutes_user?(target_user, user) || CommonAPI.thread_muted?(target_user, activity)
|
||||
User.mutes_user?(target_user, user) || CommonAPI.thread_muted?(activity, target_user)
|
||||
end
|
||||
|
||||
def for_user_and_activity(user, activity) do
|
||||
|
|
|
|||
|
|
@ -593,8 +593,8 @@ defmodule Pleroma.Web.CommonAPI do
|
|||
end
|
||||
end
|
||||
|
||||
@spec thread_muted?(User.t(), Activity.t()) :: boolean()
|
||||
def thread_muted?(%User{id: user_id}, %{data: %{"context" => context}})
|
||||
@spec thread_muted?(Activity.t(), User.t()) :: boolean()
|
||||
def thread_muted?(%{data: %{"context" => context}}, %User{id: user_id})
|
||||
when is_binary(context) do
|
||||
ThreadMute.exists?(user_id, context)
|
||||
end
|
||||
|
|
|
|||
|
|
@ -293,7 +293,7 @@ defmodule Pleroma.Web.MastodonAPI.StatusView do
|
|||
cond do
|
||||
is_nil(opts[:for]) -> false
|
||||
is_boolean(activity.thread_muted?) -> activity.thread_muted?
|
||||
true -> CommonAPI.thread_muted?(opts[:for], activity)
|
||||
true -> CommonAPI.thread_muted?(activity, opts[:for])
|
||||
end
|
||||
|
||||
attachment_data = object.data["attachment"] || []
|
||||
|
|
|
|||
|
|
@ -206,7 +206,7 @@ defmodule Pleroma.Web.Streamer do
|
|||
false <- Pleroma.Web.ActivityPub.MRF.subdomain_match?(domain_blocks, item_host),
|
||||
false <- Pleroma.Web.ActivityPub.MRF.subdomain_match?(domain_blocks, parent_host),
|
||||
true <- thread_containment(item, user),
|
||||
false <- CommonAPI.thread_muted?(user, parent) do
|
||||
false <- CommonAPI.thread_muted?(parent, user) do
|
||||
false
|
||||
else
|
||||
_ -> true
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue