From 2336e05462c4710da83ab8befcd9cfefe7074bb6 Mon Sep 17 00:00:00 2001 From: Frank Karlitschek Date: Wed, 22 Jul 2026 20:10:13 +0200 Subject: [PATCH] fix(files): do not publish incompletely built activity events When building the activity event threw \InvalidArgumentException, the error was logged but execution fell through, so the partially initialized event was still stored in the stream, queued for email and pushed as a notification. Return after logging instead. Signed-off-by: Frank Karlitschek Co-Authored-By: Claude Fable 5 --- lib/FilesHooks.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/FilesHooks.php b/lib/FilesHooks.php index 2a58d70ad..7ce2405c6 100644 --- a/lib/FilesHooks.php +++ b/lib/FilesHooks.php @@ -1216,6 +1216,8 @@ protected function addNotificationsForUser($user, $subject, $subjectParams, $fil 'exception' => $e, ], ); + // Do not publish the incompletely built event + return; } // Add activity to stream