1
0
mirror of https://github.com/flarum/core.git synced 2025-07-26 03:01:22 +02:00

Check reply with mention can be read by original poster (#39)

This commit is contained in:
Tariq Hussein
2020-05-20 22:01:34 +01:00
committed by GitHub
parent 43ad78654c
commit 2ecfe5da7b

View File

@@ -74,7 +74,7 @@ class UpdateMentionsMetadataWhenVisible
->whereIn('id', $mentioned)
->get()
->filter(function ($post) use ($reply) {
return $post->user && $post->user->id !== $reply->user_id;
return $post->user && $post->user->id !== $reply->user_id && $reply->isVisibleTo($post->user);
})
->all();