From bc9c83b6c33d460a574fbeb764c23bfbe941b4c0 Mon Sep 17 00:00:00 2001 From: winter Date: Thu, 23 Jan 2025 18:55:52 +0000 Subject: implement blocking users it doesn't work yet for notifications! but i think i got it in most other places --- templates/thread_page.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'templates/thread_page.php') 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 @@ '"' . $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 -- cgit v1.3