feat: Ability to snooze conversations (#2682)
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
class Conversations::ReopenSnoozedConversationsJob < ApplicationJob
|
||||
queue_as :low
|
||||
|
||||
def perform
|
||||
Conversation.where(status: :snoozed).where(snoozed_until: 3.days.ago..Time.current).all.each(&:open!)
|
||||
end
|
||||
end
|
||||
@@ -6,5 +6,8 @@ class TriggerScheduledItemsJob < ApplicationJob
|
||||
Campaign.where(campaign_type: :one_off, campaign_status: :active).where(scheduled_at: 3.days.ago..Time.current).all.each do |campaign|
|
||||
Campaigns::TriggerOneoffCampaignJob.perform_later(campaign)
|
||||
end
|
||||
|
||||
# Job to reopen snoozed conversations
|
||||
Conversations::ReopenSnoozedConversationsJob.perform_later
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user