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"]);
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"] = [

Loading…
Cancel
Save