]> git.mxchange.org Git - friendica.git/blobdiff - src/Object/Post.php
Merge pull request #8695 from annando/no-parent
[friendica.git] / src / Object / Post.php
index 99ab357bc0085e9cfe2ebb9c0b5a0fd48500a916..1ca02873d7f0d6b7a9144b53d5e46c98180c055c 100644 (file)
@@ -214,7 +214,7 @@ class Post
                        $pinned = DI::l10n()->t('pinned item');
                }
 
-               if ($origin && ($item['id'] != $item['parent']) && ($item['network'] == Protocol::ACTIVITYPUB)) {
+               if ($origin && ($item['gravity'] != GRAVITY_PARENT) && ($item['network'] == Protocol::ACTIVITYPUB)) {
                        // ActivityPub doesn't allow removal of remote comments
                        $delete = DI::l10n()->t('Delete locally');
                } else {
@@ -390,7 +390,7 @@ class Post
                        $buttons["like"] = false;
                }
 
-               $tags = Tag::populateTagsFromItem($item);
+               $tags = Tag::populateFromItem($item);
 
                $ago = Temporal::getRelativeDate($item['created']);
                $ago_received = Temporal::getRelativeDate($item['received']);
@@ -872,7 +872,7 @@ class Post
                        $text = '';
                }
 
-               $terms = Tag::ArrayFromURIId($item['uri-id'], [Tag::MENTION, Tag::IMPLICIT_MENTION, Tag::EXCLUSIVE_MENTION]);
+               $terms = Tag::getByURIId($item['uri-id'], [Tag::MENTION, Tag::IMPLICIT_MENTION, Tag::EXCLUSIVE_MENTION]);
                foreach ($terms as $term) {
                        $profile = Contact::getDetailsByURL($term['url']);
                        if (!empty($profile['addr']) && ((($profile['contact-type'] ?? '') ?: Contact::TYPE_UNKNOWN) != Contact::TYPE_COMMUNITY) &&