don't create notifications from muted user
This commit is contained in:
parent
2a7a17a4c3
commit
55c473e0f5
|
@ -53,9 +53,9 @@ class Notification < ApplicationRecord
|
||||||
def get_notification_owner(target)
|
def get_notification_owner(target)
|
||||||
if target.is_a? User
|
if target.is_a? User
|
||||||
target
|
target
|
||||||
elsif target&.user.is_a? User
|
elsif target.try(:user) && target.user.is_a?(User)
|
||||||
target.user
|
target.user
|
||||||
elsif target&.source.is_a? User
|
elsif target.try(:source) && target.source.is_a?(User)
|
||||||
target.source
|
target.source
|
||||||
else
|
else
|
||||||
nil
|
nil
|
||||||
|
|
Loading…
Reference in New Issue