mirror of
https://github.com/friendica/friendica
synced 2025-04-26 09:50:15 +00:00
Reliably diasplay "like" and "share" notifications
This commit is contained in:
parent
e7f25f2bee
commit
c78b7f45c5
3 changed files with 23 additions and 8 deletions
|
@ -222,10 +222,17 @@ class Notification extends BaseModel
|
|||
}
|
||||
}
|
||||
|
||||
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']);
|
||||
if (empty($contact)) {
|
||||
Logger::info('Causer not found', ['causer' => $item['causer-id']]);
|
||||
Logger::info('Causer not found', ['causer' => $cid]);
|
||||
return $message;
|
||||
}
|
||||
} elseif (in_array($notification['type'], [Post\UserNotification::NOTIF_COMMENT_PARTICIPATION, Post\UserNotification::NOTIF_ACTIVITY_PARTICIPATION])) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue