aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorrinpatch <rinpatch@sdf.org>2019-06-07 20:40:38 +0300
committerrinpatch <rinpatch@sdf.org>2019-06-07 20:40:38 +0300
commitd020f68e87decca850904b76c9053a4de024be8d (patch)
tree837eea45c4be9934cf3a0dd87231e8997e8561c4 /lib
parentd5330ed12561377e5c464bcc2774ebc692b9ac07 (diff)
downloadpleroma-d020f68e87decca850904b76c9053a4de024be8d.tar.gz
Transmogrifier: Do not crash if inReplyTo does not exist and can't be fetched
Diffstat (limited to 'lib')
-rw-r--r--lib/pleroma/web/activity_pub/transmogrifier.ex2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/pleroma/web/activity_pub/transmogrifier.ex b/lib/pleroma/web/activity_pub/transmogrifier.ex
index ff031a16e..3bb8b40b5 100644
--- a/lib/pleroma/web/activity_pub/transmogrifier.ex
+++ b/lib/pleroma/web/activity_pub/transmogrifier.ex
@@ -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