X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2Fenotify.php;h=1edad36ac0c79bd6383a72c60376e8b4660d8877;hb=c18622caf999e2ddf7e2cda5bf4a50d6506c3931;hp=4180c72e981b66a7fe7d68d163bac4c6c22cdbd8;hpb=ab9090ede1e7d9e4f05ebddde1bc6040d8a4c68b;p=friendica.git diff --git a/include/enotify.php b/include/enotify.php index 4180c72e98..1edad36ac0 100644 --- a/include/enotify.php +++ b/include/enotify.php @@ -1,6 +1,6 @@ t('%1$s [url=%2$s]shared a post[/url] from %3$s.', '[url='.$params['source_link'].']'.$params['source_name'].'[/url]', $params['link'], '[url='.$params['origin_link'].']'.$params['origin_name'].'[/url]' - ); + ); } $sitelink = $l10n->t('Please visit %s to view and/or reply to the conversation.'); @@ -604,7 +604,7 @@ function check_user_notification(int $uri_id, int $uid) { $usernotifications = DBA::select('post-user-notification', ['uri-id', 'uid', 'notification-type'], $condition); while ($usernotification = DBA::fetch($usernotifications)) { - check_item_notification($usernotification['uri-id'], $usernotification['uid'], $usernotification['notification-type']); + check_item_notification($usernotification['uri-id'], $usernotification['uid'], $usernotification['notification-type'], $uid); } DBA::close($usernotifications); } @@ -618,11 +618,11 @@ function check_user_notification(int $uri_id, int $uid) { * @return bool * @throws \Friendica\Network\HTTPException\InternalServerErrorException */ -function check_item_notification(int $uri_id, int $uid, int $notification_type) { +function check_item_notification(int $uri_id, int $uid, int $notification_type, $post_uid) { $fields = ['id', 'uri-id', 'mention', 'parent', 'parent-uri-id', 'thr-parent-id', 'title', 'body', 'author-link', 'author-name', 'author-avatar', 'author-id', 'gravity', 'guid', 'parent-uri', 'uri', 'contact-id', 'network']; - $condition = ['uri-id' => $uri_id, 'uid' => $uid, 'deleted' => false]; + $condition = ['uri-id' => $uri_id, 'uid' => [$uid, $post_uid], 'deleted' => false]; $item = Post::selectFirstForUser($uid, $fields, $condition); if (!DBA::isResult($item)) { return false;