Chatwoot/app/services/whatsapp/send_on_whatsapp_service.rb
Sojan Jose bd7aeba484
chore: Provider API prototype (#3112)
Enabling Support for Whatsapp via 360Dialog as a prototype for the provider APIs. 

Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
2021-10-05 23:35:06 +05:30

11 lines
245 B
Ruby

class Whatsapp::SendOnWhatsappService < Base::SendOnChannelService
private
def channel_class
Channel::Whatsapp
end
def perform_reply
channel.send_message(message.conversation.contact_inbox.source_id, message.content)
end
end