From a2fa791bbd95524ea513ccf2897cb00d2cb878cc Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Mon, 7 Dec 2015 23:35:33 +0100 Subject: [PATCH] Always include the direct parent in the mentions --- include/ostatus.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/include/ostatus.php b/include/ostatus.php index 59bc3b2fb8..58fd1f2b71 100644 --- a/include/ostatus.php +++ b/include/ostatus.php @@ -1453,6 +1453,14 @@ function ostatus_entry($doc, $item, $owner, $toplevel = false, $repeat = false) $mentioned[$parent[0]["author-link"]] = $parent[0]["author-link"]; $mentioned[$parent[0]["owner-link"]] = $parent[0]["owner-link"]; + + $thrparent = q("SELECT `guid`, `author-link`, `owner-link` FROM `item` WHERE `uid` = %d AND `uri` = '%s'", + intval($owner["uid"]), + dbesc($parent_item)); + if ($thrparent) { + $mentioned[$thrparent[0]["author-link"]] = $thrparent[0]["author-link"]; + $mentioned[$thrparent[0]["owner-link"]] = $thrparent[0]["owner-link"]; + } } xml_add_element($doc, $entry, "link", "", array("rel" => "ostatus:conversation",