diff options
author | rinpatch <rinpatch@sdf.org> | 2019-08-10 16:27:46 +0300 |
---|---|---|
committer | rinpatch <rinpatch@sdf.org> | 2019-08-10 16:27:46 +0300 |
commit | 0802a08871afee7f09362cbca8b802f0e27ff4b9 (patch) | |
tree | 75d2bc4a55e1469d60bb770288652c962eaa4449 /lib | |
parent | 337edb3e500dc8d3d74926eb9da739bec8e8a7ac (diff) | |
download | pleroma-0802a08871afee7f09362cbca8b802f0e27ff4b9.tar.gz |
Mastodon API: Fix thread mute detection
It was calling CommonAPI.thread_muted? with post author's account
instead of viewer's one.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/pleroma/web/mastodon_api/views/status_view.ex | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/pleroma/web/mastodon_api/views/status_view.ex b/lib/pleroma/web/mastodon_api/views/status_view.ex index 80df9b2ac..02819e116 100644 --- a/lib/pleroma/web/mastodon_api/views/status_view.ex +++ b/lib/pleroma/web/mastodon_api/views/status_view.ex @@ -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"] || [] |