diff --git a/app/Listeners/NotifyUsersMentionedInReply.php b/app/Listeners/NotifyUsersMentionedInReply.php index 8b62bdedf..245bffa26 100644 --- a/app/Listeners/NotifyUsersMentionedInReply.php +++ b/app/Listeners/NotifyUsersMentionedInReply.php @@ -12,7 +12,7 @@ final class NotifyUsersMentionedInReply public function handle(ReplyWasCreated $event): void { $event->reply->mentionedUsers()->each(function ($user) use ($event) { - if (! $user->hasBlocked($event->reply->author())) { + if (! $user->hasBlocked($event->reply->author()) && ! $event->reply->replyAble()->participants()->contains($user)) { $user->notify(new MentionNotification($event->reply)); } }); diff --git a/app/Models/Reply.php b/app/Models/Reply.php index 88acd5b0e..de29e239e 100644 --- a/app/Models/Reply.php +++ b/app/Models/Reply.php @@ -155,11 +155,6 @@ public function spamReportersRelation(): MorphToMany )->withTimestamps(); } - public function thread(): BelongsTo - { - return $this->belongsTo(Thread::class); - } - public function scopeIsSolution(Builder $builder): Builder { return $builder->has('solutionTo');