sforkowany z mirror/friendica
Stop appending entry when parent is missing in OStatus
- Addresses https://github.com/friendica/friendica/issues/6338#issuecomment-4557858542022.09-rc
rodzic
efe358c617
commit
42c06506ce
|
@ -1763,19 +1763,16 @@ class OStatus
|
||||||
$verb = NAMESPACE_ACTIVITY_SCHEMA."favorite";
|
$verb = NAMESPACE_ACTIVITY_SCHEMA."favorite";
|
||||||
self::entryContent($doc, $entry, $item, $owner, "Favorite", $verb, false);
|
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"]]);
|
$parent = Item::selectFirst([], ['uri' => $item["thr-parent"], 'uid' => $item["uid"]]);
|
||||||
|
if (DBA::isResult($parent)) {
|
||||||
if (!$parent) {
|
$as_object = $doc->createElement("activity:object");
|
||||||
$parent = [];
|
|
||||||
}
|
|
||||||
|
|
||||||
XML::addElement($doc, $as_object, "activity:object-type", self::constructObjecttype($parent));
|
XML::addElement($doc, $as_object, "activity:object-type", self::constructObjecttype($parent));
|
||||||
|
|
||||||
self::entryContent($doc, $as_object, $parent, $owner, "New entry");
|
self::entryContent($doc, $as_object, $parent, $owner, "New entry");
|
||||||
|
|
||||||
$entry->appendChild($as_object);
|
$entry->appendChild($as_object);
|
||||||
|
}
|
||||||
|
|
||||||
self::entryFooter($doc, $entry, $item, $owner);
|
self::entryFooter($doc, $entry, $item, $owner);
|
||||||
|
|
||||||
|
|
Ładowanie…
Reference in New Issue