From 7ec29d1fbc00676d8cd934bb7f93622b8f6322a0 Mon Sep 17 00:00:00 2001 From: Robbie Antenesse Date: Tue, 18 Jun 2024 10:42:35 -0600 Subject: [PATCH] Use cookie to check if anouncement should be sent at all --- src/php/router.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/php/router.php b/src/php/router.php index d448fdb..6960333 100644 --- a/src/php/router.php +++ b/src/php/router.php @@ -96,6 +96,7 @@ switch ($view) { foreach ($announcements as $announcement) { $expire = strtotime($announcement['expire']); if (time() < $expire) { + if (isset($_COOKIE['announcement-' . ($announcement['dismissId'] ?? '')])) continue; $announcements_html .= '
×︎

' . $announcement['header'] . '