fix reset confirmation email in admin section
[akkoma] / lib / pleroma / web / push / impl.ex
index 006a242af275e39eeea307e68c6b5599b29397aa..cdb827e7664820f7d08088ad489a7e7f21a033ef 100644 (file)
@@ -124,6 +124,13 @@ defmodule Pleroma.Web.Push.Impl do
 
   def format_body(activity, actor, object, mastodon_type \\ nil)
 
+  def format_body(_activity, actor, %{data: %{"type" => "ChatMessage", "content" => content}}, _) do
+    case content do
+      nil -> "@#{actor.nickname}: (Attachment)"
+      content -> "@#{actor.nickname}: #{Utils.scrub_html_and_truncate(content, 80)}"
+    end
+  end
+
   def format_body(
         %{activity: %{data: %{"type" => "Create"}}},
         actor,