diff options
-rw-r--r-- | .gitlab-ci.yml | 2 | ||||
-rw-r--r-- | lib/pleroma/web/push/impl.ex | 10 |
2 files changed, 9 insertions, 3 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6deb0a1de..30589c9c5 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,4 +1,4 @@ -image: elixir:1.7.2 +image: elixir:1.8.1 services: - name: postgres:9.6.2 diff --git a/lib/pleroma/web/push/impl.ex b/lib/pleroma/web/push/impl.ex index 33f912d34..0437ffd00 100644 --- a/lib/pleroma/web/push/impl.ex +++ b/lib/pleroma/web/push/impl.ex @@ -20,7 +20,10 @@ defmodule Pleroma.Web.Push.Impl do @doc "Performs sending notifications for user subscriptions" @spec perform_send(Notification.t()) :: list(any) - def perform_send(%{activity: %{data: %{"type" => activity_type}}, user_id: user_id} = notif) + def perform_send( + %{activity: %{data: %{"type" => activity_type}, id: activity_id}, user_id: user_id} = + notif + ) when activity_type in @types do actor = User.get_cached_by_ap_id(notif.activity.data["actor"]) @@ -37,7 +40,10 @@ defmodule Pleroma.Web.Push.Impl do notification_id: notif.id, notification_type: type, icon: avatar_url, - preferred_locale: "en" + preferred_locale: "en", + pleroma: %{ + activity_id: activity_id + } } |> Jason.encode!() |> push_message(build_sub(subscription), gcm_api_key, subscription) |