diff options
author | Egor Kislitsyn <egor@kislitsyn.com> | 2020-06-22 19:03:04 +0400 |
---|---|---|
committer | Egor Kislitsyn <egor@kislitsyn.com> | 2020-06-22 19:03:04 +0400 |
commit | 7e6f43c0d7c625a03ee0216c2d9474253ef87b5a (patch) | |
tree | 09109e9a1f349484b4fb26d9b47afff3dd3ed542 /lib | |
parent | 282f492cd5d039e3139449e186daf3a55e8c680f (diff) | |
download | pleroma-7e6f43c0d7c625a03ee0216c2d9474253ef87b5a.tar.gz pleroma-7e6f43c0d7c625a03ee0216c2d9474253ef87b5a.zip |
Add `is_muted` to notifications
Diffstat (limited to 'lib')
-rw-r--r-- | lib/pleroma/web/mastodon_api/views/notification_view.ex | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/lib/pleroma/web/mastodon_api/views/notification_view.ex b/lib/pleroma/web/mastodon_api/views/notification_view.ex index 3865be280..c97e6d32f 100644 --- a/lib/pleroma/web/mastodon_api/views/notification_view.ex +++ b/lib/pleroma/web/mastodon_api/views/notification_view.ex @@ -84,12 +84,7 @@ defmodule Pleroma.Web.MastodonAPI.NotificationView do # Note: :relationships contain user mutes (needed for :muted flag in :status) status_render_opts = %{relationships: opts[:relationships]} - - account = - AccountView.render( - "show.json", - %{user: actor, for: reading_user} - ) + account = AccountView.render("show.json", %{user: actor, for: reading_user}) response = %{ id: to_string(notification.id), @@ -97,6 +92,7 @@ defmodule Pleroma.Web.MastodonAPI.NotificationView do created_at: CommonAPI.Utils.to_masto_date(notification.inserted_at), account: account, pleroma: %{ + is_muted: User.mutes?(reading_user, actor), is_seen: notification.seen } } |