feat: Display sent status of emails in email channel (#3125)
This commit is contained in:
14
app/workers/email_reply_worker.rb
Normal file
14
app/workers/email_reply_worker.rb
Normal file
@@ -0,0 +1,14 @@
|
||||
class EmailReplyWorker
|
||||
include Sidekiq::Worker
|
||||
sidekiq_options queue: :mailers
|
||||
|
||||
def perform(message_id)
|
||||
message = Message.find(message_id)
|
||||
|
||||
return unless message.outgoing? || message.input_csat?
|
||||
return if message.private?
|
||||
|
||||
# send the email
|
||||
ConversationReplyMailer.with(account: message.account).email_reply(message).deliver_later
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user