- if (($notification['type'] == Post\UserNotification::NOTIF_SHARED) && !empty($item['causer-id'])) {
- $causer = Contact::getById($item['causer-id'], ['id', 'name', 'url']);
+ if ($item['owner-id'] != $item['author-id']) {
+ $cid = $item['owner-id'];
+ }
+ if (!empty($item['causer-id']) && ($item['causer-id'] != $item['author-id'])) {
+ $cid = $item['causer-id'];
+ }
+
+ if (($notification['type'] == Post\UserNotification::NOTIF_SHARED) && !empty($cid)) {
+ $causer = Contact::getById($cid, ['id', 'name', 'url']);