Transmogrifier: Do not crash if inReplyTo does not exist and can't be fetched
This commit is contained in:
parent
d5330ed125
commit
d020f68e87
2 changed files with 17 additions and 1 deletions
|
|
@ -339,7 +339,7 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier do
|
|||
def fix_type(%{"inReplyTo" => reply_id} = object) when is_binary(reply_id) do
|
||||
reply = Object.normalize(reply_id)
|
||||
|
||||
if reply.data["type"] == "Question" and object["name"] do
|
||||
if reply && (reply.data["type"] == "Question" and object["name"]) do
|
||||
Map.put(object, "type", "Answer")
|
||||
else
|
||||
object
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue