Direct messages should provide a distinct push notification subject
authorMark Felder <feld@FreeBSD.org>
Fri, 18 Oct 2019 22:51:34 +0000 (17:51 -0500)
committerMark Felder <feld@FreeBSD.org>
Fri, 18 Oct 2019 22:51:34 +0000 (17:51 -0500)
lib/pleroma/web/push/impl.ex

index 35d3ff07cbb4946b411eac8f040efb454931dd76..dd445e8bfe2d0877ebbe850b304b5ef6952f2979 100644 (file)
@@ -125,6 +125,10 @@ defmodule Pleroma.Web.Push.Impl do
     end
   end
 
+  def format_title(%{activity: %{data: %{"directMessage" => true}}}) do
+    "New Direct Message"
+  end
+
   def format_title(%{activity: %{data: %{"type" => type}}}) do
     case type do
       "Create" -> "New Mention"