From 9c65da98b29e1ff00df868e928f32fbff282493a Mon Sep 17 00:00:00 2001 From: Muhsin Keloth Date: Thu, 10 Apr 2025 10:21:31 +0530 Subject: [PATCH] Update conversation.rb --- app/models/conversation.rb | 28 ---------------------------- 1 file changed, 28 deletions(-) diff --git a/app/models/conversation.rb b/app/models/conversation.rb index 3fe56cbd4..a31d18e4d 100644 --- a/app/models/conversation.rb +++ b/app/models/conversation.rb @@ -136,34 +136,6 @@ class Conversation < ApplicationRecord Time.current < last_incoming_message.created_at + time.hours end - def instagram_via_messenger? - additional_attributes['type'] == 'instagram_direct_message' - end - - def can_reply_on_instagram_via_messenger? - global_config = GlobalConfig.get('ENABLE_MESSENGER_CHANNEL_HUMAN_AGENT') - - return false if last_incoming_message.nil? - - if global_config['ENABLE_MESSENGER_CHANNEL_HUMAN_AGENT'] - Time.current < last_incoming_message.created_at + 7.days - else - last_message_in_messaging_window?(24) - end - end - - def can_reply_on_instagram? - global_config = GlobalConfig.get('ENABLE_INSTAGRAM_CHANNEL_HUMAN_AGENT') - - return false if last_incoming_message.nil? - - if global_config['ENABLE_INSTAGRAM_CHANNEL_HUMAN_AGENT'] - Time.current < last_incoming_message.created_at + 7.days - else - last_message_in_messaging_window?(24) - end - end - def toggle_status # FIXME: implement state machine with aasm self.status = open? ? :resolved : :open