*/
const IMPLICIT_MENTION = 8;
/**
- * An exclusive mention transmits the post only to the target account without transmitting it to the followers, usually a forum.
+ * An exclusive mention transmits the post only to the target account without transmitting it to the followers, usually a group.
*/
const EXCLUSIVE_MENTION = 9;
*
* @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) {
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;
}
}