Merge branch 'fix/privacy-notification' into 'develop'

Privacy option affects all push notifications, not just Direct Messages

Closes #1745

See merge request pleroma/pleroma!2485
This commit is contained in:
lain 2020-05-08 09:04:24 +00:00
commit 218a22c9a3
2 changed files with 63 additions and 9 deletions

View file

@ -106,14 +106,13 @@ defmodule Pleroma.Web.Push.Impl do
def build_content(
%{
activity: %{data: %{"directMessage" => true}},
user: %{notification_settings: %{privacy_option: true}}
},
actor,
} = notification,
_actor,
_object,
_mastodon_type
mastodon_type
) do
%{title: "New Direct Message", body: "@#{actor.nickname}"}
%{body: format_title(notification, mastodon_type)}
end
def build_content(notification, actor, object, mastodon_type) do