]> git.mxchange.org Git - friendica.git/blobdiff - src/Model/Tag.php
Drop using the proxy large size for image preview
[friendica.git] / src / Model / Tag.php
index 9f0f8d29a672738a034cd3167bccf01cfa6814ad..04f3f1627eae8249706192bce0b3f44e1ec34780 100644 (file)
@@ -487,7 +487,7 @@ class Tag
         *
         * @return boolean
         */
-       public static function isMentioned(int $uriId, string $url, array $type = [self::MENTION, self::EXCLUSIVE_MENTION]): bool
+       public static function isMentioned(int $uriId, string $url, array $type = [self::MENTION, self::EXCLUSIVE_MENTION, self::AUDIENCE]): bool
        {
                $tags = self::getByURIId($uriId, $type);
                foreach ($tags as $tag) {
@@ -828,12 +828,13 @@ class Tag
        public static function getUIDListByURIId(int $uriId): array
        {
                $uids = [];
-               $tags = self::getByURIId($uriId, [self::HASHTAG]);
 
-               foreach ($tags as $tag) {
-                       $uids = array_merge($uids, self::getUIDListByTag(self::TAG_CHARACTER[self::HASHTAG] . $tag['name']));
+               foreach (self::getByURIId($uriId, [self::HASHTAG]) as $tag) {
+                       foreach (self::getUIDListByTag(self::TAG_CHARACTER[self::HASHTAG] . $tag['name']) as $uid) {
+                               $uids[$uid][] = $tag['name'];
+                       } 
                }
 
-               return array_unique($uids);
+               return $uids;
        }
 }