From fb9efd9f4682f528b1832622d192b9b5544584a9 Mon Sep 17 00:00:00 2001 From: winter Date: Mon, 13 Jan 2025 18:06:05 +0000 Subject: make the interaction buttons actually work --- templates/note.php | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'templates/note.php') diff --git a/templates/note.php b/templates/note.php index 83770aa..fdc0dc8 100644 --- a/templates/note.php +++ b/templates/note.php @@ -1,3 +1,14 @@ +getInteractionsWithAuthor($user->actor); + $interKinds = array_map(fn($inter) => $inter->kind, $interactions); +} +?>
$note->author]); ?> @@ -21,7 +32,11 @@
$action, 'note' => $note]); + render_template('interaction_button', [ + 'action' => $action, + 'note' => $note, + 'active' => in_array(InteractionKind::from($action), $interKinds) + ]); } ?>
-- cgit v1.3