- if ($notification["visible"] && !$notification["spam"] &&
- !$notification["deleted"] && !is_array($result[$notification["parent"]])) {
- $result[$notification["parent"]] = $notification;
+ if ($notification["visible"]
+ && !$notification["spam"]
+ && !$notification["deleted"]
+ && !(x($result, $notification["parent"]) && is_array($result[$notification["parent"]]))
+ ) {
+ // Should we condense the notifications or show them all?
+ if (PConfig::get(local_user(), 'system', 'detailed_notif')) {
+ $result[$notification["id"]] = $notification;
+ } else {
+ $result[$notification["parent"]] = $notification;
+ }