From 7ef82a51e42e6ab7d8f093710588a320d6481ebe 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 473a2e945..0df1bbce6 100644 --- a/lib/FilesHooks.php +++ b/lib/FilesHooks.php @@ -1213,6 +1213,8 @@ protected function addNotificationsForUser($user, $subject, $subjectParams, $fil 'exception' => $e, ], ); + // Do not publish the incompletely built event + return; } // Add activity to stream