mirror of
https://github.com/friendica/friendica
synced 2024-12-23 09:20:17 +00:00
Merge pull request #10045 from annando/fix-notification
Fix notifications for public posts
This commit is contained in:
commit
5b8f7361ea
1 changed files with 3 additions and 3 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue