Skip to content

Commit

Permalink
通知送信者の名前を定数に変更
Browse files Browse the repository at this point in the history
  • Loading branch information
goruchanchan committed Apr 16, 2024
1 parent 5e18955 commit 8dddae7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/models/inquiry_notifier.rb
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
# frozen_string_literal: true

class InquiryNotifier
NOTIFICATION_SENDER_NAME = 'pjord'

def call(payload)
inquiry = payload[:inquiry]
return if inquiry.nil?

sender = User.find_by(login_name: 'pjord')
sender = User.find_by(login_name: NOTIFICATION_SENDER_NAME)
User.admins.each do |receiver|
ActivityDelivery.with(inquiry:, receiver:, sender:).notify(:came_inquiry)
end
Expand Down

0 comments on commit 8dddae7

Please sign in to comment.