Mastodon API: Fix thread mute detection

It was calling CommonAPI.thread_muted? with post author's account
instead of viewer's one.
This commit is contained in:
rinpatch 2019-08-10 16:27:46 +03:00
commit 0802a08871
3 changed files with 5 additions and 2 deletions

View file

@ -168,7 +168,7 @@ defmodule Pleroma.Web.MastodonAPI.StatusView do
thread_muted? =
case activity.thread_muted? do
thread_muted? when is_boolean(thread_muted?) -> thread_muted?
nil -> CommonAPI.thread_muted?(user, activity)
nil -> (opts[:for] && CommonAPI.thread_muted?(opts[:for], activity)) || false
end
attachment_data = object.data["attachment"] || []