Issue 13845: Support "sensitive" attribute

This commit is contained in:
Michael 2024-02-04 21:45:30 +00:00
parent d9d42105d6
commit 15df9990da
11 changed files with 53 additions and 28 deletions

View file

@ -378,6 +378,18 @@ class Tag
return DBA::exists('post-tag', ['uri-id' => $uriId, 'type' => [self::HASHTAG, self::MENTION, self::EXCLUSIVE_MENTION, self::IMPLICIT_MENTION]]);
}
/**
* Check for a given hashtag on a given post
*
* @param integer $uriId
* @param string $tag
* @return boolean
*/
public static function existsTagForPost(int $uriId, string $tag): bool
{
return DBA::exists('tag-view', ['uri-id' => $uriId, 'type' => self::HASHTAG, 'name' => $tag]);
}
/**
* Remove tag/mention
*