feat: Add liquid processing for SMS campaigns (#10981)
Liquid template processing for SMS campaigns fixes: https://github.com/chatwoot/chatwoot/issues/10980 Co-authored-by: Sojan Jose <sojan@pepalo.com>
This commit is contained in:
@@ -22,7 +22,8 @@ class Sms::OneoffSmsCampaignService
|
||||
campaign.account.contacts.tagged_with(audience_labels, any: true).each do |contact|
|
||||
next if contact.phone_number.blank?
|
||||
|
||||
send_message(to: contact.phone_number, content: campaign.message)
|
||||
content = Liquid::CampaignTemplateService.new(campaign: campaign, contact: contact).call(campaign.message)
|
||||
send_message(to: contact.phone_number, content: content)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user