diff --git a/src/EventGenerator/EventGenerator.php b/src/EventGenerator/EventGenerator.php index b975f6083..4c29e44ba 100644 --- a/src/EventGenerator/EventGenerator.php +++ b/src/EventGenerator/EventGenerator.php @@ -147,8 +147,19 @@ public function generateEvent(EntityInterface $entity, UserInterface $user, arra } } - unset($data["event"]); - unset($data["queue"]); + $allowed_keys = [ + "file_upload_uri", + "fedora_uri", + "source_uri", + "destination_uri", + "args", + "mimetype", + "source_field", + ]; + $keys_to_unset = array_diff(array_keys($data), $allowed_keys); + foreach ($keys_to_unset as $key) { + unset($data[$key]); + } if (!empty($data)) { $event["attachment"] = [