ostatus: note handler: appropriately use Object.normalize()
authorWilliam Pitcock <nenolod@dereferenced.org>
Sun, 25 Nov 2018 19:05:17 +0000 (19:05 +0000)
committerWilliam Pitcock <nenolod@dereferenced.org>
Tue, 4 Dec 2018 04:52:09 +0000 (04:52 +0000)
lib/pleroma/web/ostatus/handlers/note_handler.ex

index 0d40802913513c27317f87102f9121ffbfcb3a93..39004367a3ae3df3964e5554a84d7241943a7f9c 100644 (file)
@@ -106,7 +106,8 @@ defmodule Pleroma.Web.OStatus.NoteHandler do
          cw <- OStatus.get_cw(entry),
          inReplyTo <- XML.string_from_xpath("//thr:in-reply-to[1]/@ref", entry),
          inReplyToActivity <- fetch_replied_to_activity(entry, inReplyTo),
-         inReplyTo <- (inReplyToActivity && inReplyToActivity.data["object"]["id"]) || inReplyTo,
+         inReplyToObject <- (inReplyToActivity && Object.normalize(inReplyToActivity.data["object"])) || nil,
+         inReplyTo <- (inReplyToObject && inReplyToObject.data["id"]) || inReplyTo,
          attachments <- OStatus.get_attachments(entry),
          context <- get_context(entry, inReplyTo),
          tags <- OStatus.get_tags(entry),