]> git.mxchange.org Git - friendica.git/commitdiff
Always include the direct parent in the mentions
authorMichael Vogel <icarus@dabo.de>
Mon, 7 Dec 2015 22:35:33 +0000 (23:35 +0100)
committerMichael Vogel <icarus@dabo.de>
Mon, 7 Dec 2015 22:35:33 +0000 (23:35 +0100)
include/ostatus.php

index 59bc3b2fb8a2e511e6a70ed904f4c20ba39f03c4..58fd1f2b71e6f93b5e8db2cce421bbc2441faa95 100644 (file)
@@ -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",