1
0
mirror of https://github.com/flarum/core.git synced 2025-08-02 22:47:33 +02:00

Merge pull request #18 from sijad/access-check

Check access before send Mention notification
This commit is contained in:
Toby Zerner
2016-03-11 13:33:18 +10:30

View File

@@ -130,7 +130,7 @@ class UpdateUserMentionsMetadata
$users = User::whereIn('id', $mentioned) $users = User::whereIn('id', $mentioned)
->get() ->get()
->filter(function ($user) use ($post) { ->filter(function ($user) use ($post) {
return $user->id !== $post->user->id; return $post->isVisibleTo($user) && $user->id !== $post->user->id;
}) })
->all(); ->all();