Hide the sender when privacy option is enabled
This commit is contained in:
parent
57736c1833
commit
a2580adc91
@ -108,11 +108,11 @@ defmodule Pleroma.Web.Push.Impl do
|
|||||||
%{
|
%{
|
||||||
user: %{notification_settings: %{privacy_option: true}}
|
user: %{notification_settings: %{privacy_option: true}}
|
||||||
} = notification,
|
} = notification,
|
||||||
actor,
|
_actor,
|
||||||
_object,
|
_object,
|
||||||
mastodon_type
|
mastodon_type
|
||||||
) do
|
) do
|
||||||
%{title: format_title(notification, mastodon_type), body: "@#{actor.nickname}"}
|
%{body: format_title(notification, mastodon_type)}
|
||||||
end
|
end
|
||||||
|
|
||||||
def build_content(notification, actor, object, mastodon_type) do
|
def build_content(notification, actor, object, mastodon_type) do
|
||||||
|
@ -209,8 +209,7 @@ defmodule Pleroma.Web.Push.ImplTest do
|
|||||||
object = Object.normalize(activity)
|
object = Object.normalize(activity)
|
||||||
|
|
||||||
assert Impl.build_content(notif, actor, object) == %{
|
assert Impl.build_content(notif, actor, object) == %{
|
||||||
body: "@Bob",
|
body: "New Direct Message"
|
||||||
title: "New Direct Message"
|
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user