From ce2c1b4fc1b9328e8f968083062b921e02b4fa59 Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Sat, 2 Apr 2016 17:43:53 +0200 Subject: [PATCH] Small bugfix: We always liked the parent --- include/ostatus.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/ostatus.php b/include/ostatus.php index bf14536f9e..b798a605f9 100644 --- a/include/ostatus.php +++ b/include/ostatus.php @@ -1712,7 +1712,8 @@ class ostatus { $as_object = $doc->createElement("activity:object"); - $parent = q("SELECT * FROM `item` WHERE `id` = %d", intval($item["parent"])); + $parent = q("SELECT * FROM `item` WHERE `uri` = '%s' AND `uid` = %d", + dbesc($item["thr-parent"]), intval($item["uid"])); $parent_item = (($item['thr-parent']) ? $item['thr-parent'] : $item['parent-uri']); xml::add_element($doc, $as_object, "activity:object-type", self::construct_objecttype($parent[0]));