mirror of
https://github.com/friendica/friendica
synced 2025-04-25 17:50:11 +00:00
Support for desktop notifications for reshared posts
This commit is contained in:
parent
35e2ae3925
commit
8bb2c9fc13
2 changed files with 19 additions and 2 deletions
|
@ -257,8 +257,12 @@ class UserNotification
|
|||
}
|
||||
}
|
||||
|
||||
if (empty($notification_type)) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Only create notifications for posts and comments, not for activities
|
||||
if (empty($notification_type) || !in_array($item['gravity'], [GRAVITY_PARENT, GRAVITY_COMMENT])) {
|
||||
if (($item['gravity'] == GRAVITY_ACTIVITY) && ($item['verb'] != Activity::ANNOUNCE)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -280,7 +284,7 @@ class UserNotification
|
|||
*/
|
||||
private static function insertNotificationByItem(int $type, int $uid, array $item): void
|
||||
{
|
||||
if (($item['gravity'] == GRAVITY_ACTIVITY) &&
|
||||
if (($item['verb'] != Activity::ANNOUNCE) && ($item['gravity'] == GRAVITY_ACTIVITY) &&
|
||||
!in_array($type, [self::TYPE_DIRECT_COMMENT, self::TYPE_DIRECT_THREAD_COMMENT])) {
|
||||
// Activities are only stored when performed on the user's post or comment
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue