diff options
Diffstat (limited to 'templates/thread_page.php')
| -rw-r--r-- | templates/thread_page.php | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/templates/thread_page.php b/templates/thread_page.php index e5e5389..d16c6aa 100644 --- a/templates/thread_page.php +++ b/templates/thread_page.php @@ -1,5 +1,6 @@ <?php use Digitigrade\Model\Note; +use Digitigrade\Model\UserAccount; call_template('skeleton', [ 'pageTitle' => '"' . $note->plainContent . '" - @' . $note->author->getFullHandle(), @@ -7,7 +8,12 @@ call_template('skeleton', [ ], function () { global $note; $notes = Note::findAllInThread($note->threadApex ?? $note); + $user = UserAccount::findByCurrentSession(); foreach ($notes as $n) { - call_template('note', ['note' => $n, 'selected' => $n == $note]); + if ($user != null && $user->actor->blocks($n->author)) { + call_template('note_hidden'); + } else { + call_template('note', ['note' => $n, 'selected' => $n == $note]); + } } });
\ No newline at end of file |
