X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FModel%2FItem.php;h=1096c221316bf84fb4283a0d1058056af3707d98;hb=92cf4879e5c5c3b295a7ac79d800b240282cc99c;hp=bd8d03359ef3b19677d9ae23999c3a7b40dd4a59;hpb=cf0d36737f3548cec3da63a2d38e51957f2bd12c;p=friendica.git diff --git a/src/Model/Item.php b/src/Model/Item.php index bd8d03359e..1096c22131 100644 --- a/src/Model/Item.php +++ b/src/Model/Item.php @@ -61,7 +61,7 @@ class Item // Field list that is used to display the items const DISPLAY_FIELDLIST = [ - 'uid', 'id', 'parent', 'uri', 'thr-parent', 'parent-uri', 'guid', 'network', 'gravity', + 'uid', 'id', 'parent', 'uri-id', 'uri', 'thr-parent', 'parent-uri', 'guid', 'network', 'gravity', 'commented', 'created', 'edited', 'received', 'verb', 'object-type', 'postopts', 'plink', 'wall', 'private', 'starred', 'origin', 'title', 'body', 'file', 'attach', 'language', 'content-warning', 'location', 'coord', 'app', 'rendered-hash', 'rendered-html', 'object', @@ -77,7 +77,7 @@ class Item ]; // Field list that is used to deliver items via the protocols - const DELIVER_FIELDLIST = ['uid', 'id', 'parent', 'uri', 'thr-parent', 'parent-uri', 'guid', + const DELIVER_FIELDLIST = ['uid', 'id', 'parent', 'uri-id', 'uri', 'thr-parent', 'parent-uri', 'guid', 'parent-guid', 'created', 'edited', 'verb', 'object-type', 'object', 'target', 'private', 'title', 'body', 'location', 'coord', 'app', 'attach', 'tag', 'deleted', 'extid', 'post-type', @@ -1249,8 +1249,8 @@ class Item return; } - $xo = XML::parseString($item["object"], false); - $xt = XML::parseString($item["target"], false); + $xo = XML::parseString($item["object"]); + $xt = XML::parseString($item["target"]); if ($xt->type != Activity\ObjectType::NOTE) { return; @@ -1674,6 +1674,11 @@ class Item // Check for hashtags in the body and repair or add hashtag links self::setHashtags($item); + // Store tags from the body if this hadn't been handled previously in the protocol classes + if (!Tag::existsForPost($item['uri-id'])) { + Tag::storeFromBody($item['uri-id'], $item['body']); + } + $item['thr-parent'] = $item['parent-uri']; $notify_type = Delivery::POST; @@ -3558,7 +3563,7 @@ class Item return $ev; } - $tags = Term::populateTagsFromItem($item); + $tags = Tag::populateFromItem($item); $item['tags'] = $tags['tags']; $item['hashtags'] = $tags['hashtags'];