fix: Check medium to decide 24 hour window (#1245)

This commit is contained in:
Pranav Raj S
2020-09-17 23:32:19 +05:30
committed by GitHub
parent 8b953917e1
commit 646746aa10
2 changed files with 27 additions and 2 deletions

View File

@@ -31,10 +31,10 @@ class Channel::TwilioSms < ApplicationRecord
has_one :inbox, as: :channel, dependent: :destroy
def name
medium == :sms ? 'Twilio SMS' : 'Whatsapp'
medium == 'sms' ? 'Twilio SMS' : 'Whatsapp'
end
def has_24_hour_messaging_window?
true
medium == 'whatsapp'
end
end