mirror of
https://github.com/friendica/friendica
synced 2024-11-10 08:22:57 +00:00
Stop appending entry when parent is missing in OStatus
- Addresses https://github.com/friendica/friendica/issues/6338#issuecomment-455785854
This commit is contained in:
parent
efe358c617
commit
42c06506ce
1 changed files with 7 additions and 10 deletions
|
@ -1763,20 +1763,17 @@ class OStatus
|
|||
$verb = NAMESPACE_ACTIVITY_SCHEMA."favorite";
|
||||
self::entryContent($doc, $entry, $item, $owner, "Favorite", $verb, false);
|
||||
|
||||
$as_object = $doc->createElement("activity:object");
|
||||
|
||||
$parent = Item::selectFirst([], ['uri' => $item["thr-parent"], 'uid' => $item["uid"]]);
|
||||
if (DBA::isResult($parent)) {
|
||||
$as_object = $doc->createElement("activity:object");
|
||||
|
||||
if (!$parent) {
|
||||
$parent = [];
|
||||
XML::addElement($doc, $as_object, "activity:object-type", self::constructObjecttype($parent));
|
||||
|
||||
self::entryContent($doc, $as_object, $parent, $owner, "New entry");
|
||||
|
||||
$entry->appendChild($as_object);
|
||||
}
|
||||
|
||||
XML::addElement($doc, $as_object, "activity:object-type", self::constructObjecttype($parent));
|
||||
|
||||
self::entryContent($doc, $as_object, $parent, $owner, "New entry");
|
||||
|
||||
$entry->appendChild($as_object);
|
||||
|
||||
self::entryFooter($doc, $entry, $item, $owner);
|
||||
|
||||
return $entry;
|
||||
|
|
Loading…
Reference in a new issue