Browse Source

Stripping out json metadata in the queue messages except for the ones… (#973)

* Stripping out json metadata in the queue messages except for the ones java is expecting

* coding standards
pull/980/head
dannylamb 1 year ago committed by GitHub
parent
commit
e3399d3968
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 15
      src/EventGenerator/EventGenerator.php

15
src/EventGenerator/EventGenerator.php

@ -147,8 +147,19 @@ class EventGenerator implements EventGeneratorInterface {
} }
} }
unset($data["event"]); $allowed_keys = [
unset($data["queue"]); "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)) { if (!empty($data)) {
$event["attachment"] = [ $event["attachment"] = [

Loading…
Cancel
Save