Fix notifications to use the user's account
This commit is contained in:
@@ -38,6 +38,6 @@ module AvatarsHelper
|
||||
end
|
||||
|
||||
def avatar_image_tag(user, **options)
|
||||
image_tag user_avatar_url(user), aria: { hidden: "true" }, size: 48, title: user.name, **options
|
||||
image_tag user_avatar_url(user, script_name: user.account.slug), aria: { hidden: "true" }, size: 48, title: user.name, **options
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
class Notification < ApplicationRecord
|
||||
include PushNotifiable
|
||||
|
||||
belongs_to :account, default: -> { Current.account }
|
||||
belongs_to :account, default: -> { user.account }
|
||||
belongs_to :user
|
||||
belongs_to :creator, class_name: "User"
|
||||
belongs_to :source, polymorphic: true
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
class Notification::Bundle < ApplicationRecord
|
||||
belongs_to :account, default: -> { Current.account }
|
||||
belongs_to :account, default: -> { user.account }
|
||||
belongs_to :user
|
||||
|
||||
enum :status, %i[ pending processing delivered ]
|
||||
|
||||
Reference in New Issue
Block a user