Hide the sender when privacy option is enabled
This commit is contained in:
parent
57736c1833
commit
a2580adc91
2 changed files with 3 additions and 4 deletions
|
@ -108,11 +108,11 @@ def build_content(
|
|||
%{
|
||||
user: %{notification_settings: %{privacy_option: true}}
|
||||
} = notification,
|
||||
actor,
|
||||
_actor,
|
||||
_object,
|
||||
mastodon_type
|
||||
) do
|
||||
%{title: format_title(notification, mastodon_type), body: "@#{actor.nickname}"}
|
||||
%{body: format_title(notification, mastodon_type)}
|
||||
end
|
||||
|
||||
def build_content(notification, actor, object, mastodon_type) do
|
||||
|
|
|
@ -209,8 +209,7 @@ test "returns info content for direct message with enabled privacy option" do
|
|||
object = Object.normalize(activity)
|
||||
|
||||
assert Impl.build_content(notif, actor, object) == %{
|
||||
body: "@Bob",
|
||||
title: "New Direct Message"
|
||||
body: "New Direct Message"
|
||||
}
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue