-
I am using the ActsAsTenant gem and would like to add the module NoticedNotificationExtensions
extend ActiveSupport::Concern
included do
acts_as_tenant(:account)
end
end
module NoticedEventExtensions
extend ActiveSupport::Concern
included do
acts_as_tenant(:account)
end
end
Rails.application.config.to_prepare do
Noticed::Event.include NoticedEventExtensions
Noticed::Notification.include NoticedNotificationExtensions
end However, when Sidekiq is sending the notification and doesn't have the Groups::NewMessageNotifier.with(
message:,
mentioned:,
record: group,
account: group.account
).deliver(member) I know I can wrap it in |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
noticed/app/models/concerns/noticed/deliverable.rb Lines 66 to 73 in 5dc5842 I imagine this will work: notifier = Groups::NewMessageNotifier.with(
message:,
mentioned:,
record: group,
account: group.account
)
notifier.account = group.account
notifier.deliver(member) Also just using Groups::NewMessageNotifier.new(
params: {
message:,
mentioned:,
},
record: group,
account: group.account
).deliver(member) Sidekiq has an ActsAsTenant middleware that should set the current tenant though? |
Beta Was this translation helpful? Give feedback.
with
assigns attributes usingnew
in ActiveRecord but it assigns them toparams
.noticed/app/models/concerns/noticed/deliverable.rb
Lines 66 to 73 in 5dc5842
I imagine this will work:
Also just using
new
directly: