Fix task name for robotstxt
[akkoma] / lib / pleroma / web / common_api / utils.ex
index 22594be4605f24fb81b3166f1b002e9aa1df4c15..aee19a840de04aa2c1cc9e5d1e73a0a6299557f7 100644 (file)
@@ -230,12 +230,13 @@ defmodule Pleroma.Web.CommonAPI.Utils do
     end
   end
 
-  def make_context(_, %Participation{} = participation) do
+  def make_context(%{in_reply_to_conversation: %Participation{} = participation}) do
     Repo.preload(participation, :conversation).conversation.ap_id
   end
 
-  def make_context(%Activity{data: %{"context" => context}}, _), do: context
-  def make_context(_, _), do: Utils.generate_context_id()
+  def make_context(%{in_reply_to: %Activity{data: %{"context" => context}}}), do: context
+  def make_context(%{quote: %Activity{data: %{"context" => context}}}), do: context
+  def make_context(_), do: Utils.generate_context_id()
 
   def maybe_add_attachments(parsed, _attachments, false = _no_links), do: parsed