From 8fcc4aba3c5f8eb2dd7175497d4214c615c1b9d0 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Thu, 15 Aug 2024 16:52:54 +0200 Subject: [PATCH] Skip already queued worker notifications for stacked notifications See https://www.woltlab.com/community/thread/307700-fehlermeldung-beim-absenden-eines-beitrags-doppelposting/ --- .../user/notification/UserNotificationHandler.class.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/wcfsetup/install/files/lib/system/user/notification/UserNotificationHandler.class.php b/wcfsetup/install/files/lib/system/user/notification/UserNotificationHandler.class.php index 9a1415c6e2..95b5fe5bbc 100644 --- a/wcfsetup/install/files/lib/system/user/notification/UserNotificationHandler.class.php +++ b/wcfsetup/install/files/lib/system/user/notification/UserNotificationHandler.class.php @@ -308,10 +308,11 @@ class UserNotificationHandler extends SingletonFactory } } - $sql = "INSERT INTO wcf1_service_worker_notification (workerID, notificationID, time) - SELECT workerID, ?, ? - FROM wcf1_service_worker - WHERE userID = ?"; + $sql = "INSERT IGNORE INTO wcf1_service_worker_notification + (workerID, notificationID, time) + SELECT workerID, ?, ? + FROM wcf1_service_worker + WHERE userID = ?"; $statement = WCF::getDB()->prepare($sql); foreach ($notifications as $userID => $notification) { -- 2.20.1