aboutsummaryrefslogtreecommitdiff
path: root/lib/pleroma/web
diff options
context:
space:
mode:
Diffstat (limited to 'lib/pleroma/web')
-rw-r--r--lib/pleroma/web/mastodon_api/views/push_subscription_view.ex7
-rw-r--r--lib/pleroma/web/push/push.ex8
2 files changed, 10 insertions, 5 deletions
diff --git a/lib/pleroma/web/mastodon_api/views/push_subscription_view.ex b/lib/pleroma/web/mastodon_api/views/push_subscription_view.ex
index c8b95d14c..67e86294e 100644
--- a/lib/pleroma/web/mastodon_api/views/push_subscription_view.ex
+++ b/lib/pleroma/web/mastodon_api/views/push_subscription_view.ex
@@ -5,7 +5,12 @@ defmodule Pleroma.Web.MastodonAPI.PushSubscriptionView do
%{
id: to_string(subscription.id),
endpoint: subscription.endpoint,
- alerts: Map.get(subscription.data, "alerts")
+ alerts: Map.get(subscription.data, "alerts"),
+ server_key: server_key()
}
end
+
+ defp server_key do
+ Keyword.get(Application.get_env(:web_push_encryption, :vapid_details), :public_key)
+ end
end
diff --git a/lib/pleroma/web/push/push.ex b/lib/pleroma/web/push/push.ex
index 5a873ec19..fb6605f30 100644
--- a/lib/pleroma/web/push/push.ex
+++ b/lib/pleroma/web/push/push.ex
@@ -100,16 +100,16 @@ defmodule Pleroma.Web.Push do
def format(%{activity: %{data: %{"type" => "Announce"}}}, actor) do
%{
- title: "New Announce",
- body: "@#{actor.nickname} has announced your post",
+ title: "New Repeat",
+ body: "@#{actor.nickname} has repeated your post",
icon: User.avatar_url(actor)
}
end
def format(%{activity: %{data: %{"type" => "Like"}}}, actor) do
%{
- title: "New Like",
- body: "@#{actor.nickname} has liked your post",
+ title: "New Favorite",
+ body: "@#{actor.nickname} has favorited your post",
icon: User.avatar_url(actor)
}
end