Posts from contacts can now be collapsed

This commit is contained in:
Michael 2023-01-08 17:40:05 +00:00
parent c074da2b87
commit 50e43c530e
9 changed files with 229 additions and 150 deletions

View file

@ -3048,6 +3048,9 @@ class Item
// Compile eventual content filter reasons
$filter_reasons = [];
if (!$is_preview && DI::userSession()->getPublicContactId() != $item['author-id']) {
if (Contact\User::isCollapsed($item['author-id'], $item['uid'])) {
$filter_reasons[] = DI::l10n()->t('Content from %s is collapsed', $item['author-name']);
}
if (!empty($item['content-warning']) && (!DI::userSession()->getLocalUserId() || !DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'system', 'disable_cw', false))) {
$filter_reasons[] = DI::l10n()->t('Content warning: %s', $item['content-warning']);
}