Skip to content

Commit

Permalink
Fix notifications.
Browse files Browse the repository at this point in the history
  • Loading branch information
satanasov committed Aug 5, 2017
1 parent e9681bd commit 5633490
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
3 changes: 2 additions & 1 deletion controller/notifyhelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ public function notify($type, $topic_id, $post_id, $post_subject, $poster_user,
$phpbb_notifications->add_notifications('notification.type.postlove', $notification_data);
break;
case 'remove':
$phpbb_notifications->delete_notifications('notification.type.postlove', $notification_data);
$notifications = $phpbb_notifications->get_item_type_class('notification.type.postlove');
$phpbb_notifications->delete_notifications('notification.type.postlove', $notifications->get_item_id($notification_data));
break;
}
}
Expand Down
8 changes: 5 additions & 3 deletions notification/postlove.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,12 @@ public function find_users_for_notification($data, $options = array())
$options = array_merge(array(
'ignore_users' => array(),
), $options);
$users = array(
$data['user_id'] => 0,
);
$this->user_loader->load_users(array_keys($users));

$this->user_loader->load_users(array_keys($data['user_id']));

return $this->check_user_notification_options(array_keys($data['user_id']), $options);
return $this->check_user_notification_options(array_keys($users), $options);
}

/**
Expand Down

0 comments on commit 5633490

Please sign in to comment.