Privacy option affects all push notifications, not just Direct Messages

This commit is contained in:
Mark Felder 2020-05-06 16:30:05 -05:00
parent 68a126317d
commit 57736c1833
1 changed files with 3 additions and 4 deletions

View File

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