Comstants for features

This commit is contained in:
Michael 2024-03-24 13:42:48 +00:00
parent d824bb536f
commit c041c65c1d
20 changed files with 273 additions and 274 deletions

View file

@ -1079,13 +1079,13 @@ class Post
$owner = User::getOwnerDataById($a->getLoggedInUserId());
$item = $this->getData();
if (!empty($item['content-warning']) && Feature::isEnabled(DI::userSession()->getLocalUserId(), 'add_abstract')) {
if (!empty($item['content-warning']) && Feature::isEnabled(DI::userSession()->getLocalUserId(), Feature::ADD_ABSTRACT)) {
$text = '[abstract=' . Protocol::ACTIVITYPUB . ']' . $item['content-warning'] . "[/abstract]\n";
} else {
$text = '';
}
if (!Feature::isEnabled(DI::userSession()->getLocalUserId(), 'explicit_mentions')) {
if (!Feature::isEnabled(DI::userSession()->getLocalUserId(), Feature::EXPLICIT_MENTIONS)) {
return $text;
}