Notification: Fix notifications backfill for compacted activities
authorlain <lain@soykaf.club>
Wed, 3 Jun 2020 18:51:59 +0000 (20:51 +0200)
committerlain <lain@soykaf.club>
Wed, 3 Jun 2020 18:51:59 +0000 (20:51 +0200)
lib/pleroma/notification.ex

index 0f33d282daa17c02bc3eefafc6066563298decf0..455d214bf4a4faa7f80975f7cc7acfb25ace826a 100644 (file)
@@ -412,7 +412,7 @@ defmodule Pleroma.Notification do
   defp type_from_activity_object(%{data: %{"type" => "Create"}} = activity) do
     object = Object.get_by_ap_id(activity.data["object"])
 
-    case object.data["type"] do
+    case object && object.data["type"] do
       "ChatMessage" -> "pleroma:chat_mention"
       _ -> "mention"
     end