mirror of
https://github.com/friendica/friendica
synced 2025-04-26 07:10:12 +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
|
@ -153,6 +153,8 @@ class Notification extends BaseFactory implements ICanCreateFromTableRow
|
|||
$title = '';
|
||||
}
|
||||
|
||||
$this->logger->debug('Got verb and type', ['verb' => $Notification->verb, 'type' => $Notification->type]);
|
||||
|
||||
switch ($Notification->verb) {
|
||||
case Activity::LIKE:
|
||||
switch ($Notification->type) {
|
||||
|
@ -182,6 +184,17 @@ class Notification extends BaseFactory implements ICanCreateFromTableRow
|
|||
case Post\UserNotification::TYPE_DIRECT_THREAD_COMMENT:
|
||||
$msg = $userL10n->t('%1$s shared your post %2$s');
|
||||
break;
|
||||
case Post\UserNotification::TYPE_SHARED:
|
||||
if (($causer['id'] != $author['id']) && ($title != '')) {
|
||||
$msg = $userL10n->t('%1$s shared the post %2$s from %3$s');
|
||||
} elseif ($causer['id'] != $author['id']) {
|
||||
$msg = $userL10n->t('%1$s shared a post from %3$s');
|
||||
} elseif ($title != '') {
|
||||
$msg = $userL10n->t('%1$s shared the post %2$s');
|
||||
} else {
|
||||
$msg = $userL10n->t('%1$s shared a post');
|
||||
}
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case Activity::POST:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue