don't create notifications from muted user

This commit is contained in:
Andreas Nedbal 2022-12-29 03:31:33 +01:00 committed by Andreas Nedbal
parent 2a7a17a4c3
commit 55c473e0f5
1 changed files with 2 additions and 2 deletions

View File

@ -53,9 +53,9 @@ class Notification < ApplicationRecord
def get_notification_owner(target)
if target.is_a? User
target
elsif target&.user.is_a? User
elsif target.try(:user) && target.user.is_a?(User)
target.user
elsif target&.source.is_a? User
elsif target.try(:source) && target.source.is_a?(User)
target.source
else
nil