Check for parent existence in Protocol\DFRN
- Address https://github.com/friendica/friendica/issues/8877#issuecomment-660263687
This commit is contained in:
parent
b4d59c25a8
commit
78f6ea94bb
|
@ -963,10 +963,12 @@ class DFRN
|
||||||
if ($item['gravity'] != GRAVITY_PARENT) {
|
if ($item['gravity'] != GRAVITY_PARENT) {
|
||||||
$parent_item = (($item['thr-parent']) ? $item['thr-parent'] : $item['parent-uri']);
|
$parent_item = (($item['thr-parent']) ? $item['thr-parent'] : $item['parent-uri']);
|
||||||
$parent = Item::selectFirst(['guid', 'plink'], ['uri' => $parent_item, 'uid' => $item['uid']]);
|
$parent = Item::selectFirst(['guid', 'plink'], ['uri' => $parent_item, 'uid' => $item['uid']]);
|
||||||
$attributes = ["ref" => $parent_item, "type" => "text/html",
|
if (DBA::isResult($parent)) {
|
||||||
"href" => $parent['plink'],
|
$attributes = ["ref" => $parent_item, "type" => "text/html",
|
||||||
"dfrn:diaspora_guid" => $parent['guid']];
|
"href" => $parent['plink'],
|
||||||
XML::addElement($doc, $entry, "thr:in-reply-to", "", $attributes);
|
"dfrn:diaspora_guid" => $parent['guid']];
|
||||||
|
XML::addElement($doc, $entry, "thr:in-reply-to", "", $attributes);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add conversation data. This is used for OStatus
|
// Add conversation data. This is used for OStatus
|
||||||
|
|
Loading…
Reference in New Issue
Block a user