mirror of
https://github.com/friendica/friendica
synced 2025-04-26 06:30:11 +00:00
Issue 11189: Fix notifications for new posts
This commit is contained in:
parent
ec897c6c85
commit
cd0a0c3424
2 changed files with 72 additions and 56 deletions
|
@ -140,7 +140,7 @@ class Notification extends BaseFactory implements ICanCreateFromTableRow
|
|||
$title = '';
|
||||
}
|
||||
|
||||
$this->logger->debug('Got verb and type', ['verb' => $Notification->verb, 'type' => $Notification->type]);
|
||||
$this->logger->debug('Got verb and type', ['verb' => $Notification->verb, 'type' => $Notification->type, 'causer' => $causer['id'], 'author' => $author['id'], 'item' => $item['id'], 'uid' => $Notification->uid]);
|
||||
|
||||
switch ($Notification->verb) {
|
||||
case Activity::LIKE:
|
||||
|
@ -239,6 +239,18 @@ class Notification extends BaseFactory implements ICanCreateFromTableRow
|
|||
case Post\UserNotification::TYPE_DIRECT_THREAD_COMMENT:
|
||||
$msg = $userL10n->t('%1$s commented on your thread %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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue