feat: Add attachment support for Signal and WhatsApp channels
- Signal: Use base64Attachments field in signal-cli-rest-api - WhatsApp: Implement Baileys attachment sending for images, videos, audio, and documents - Both channels retrieve attachments from Zammad Store model - Support multiple attachments per message
This commit is contained in:
parent
9139c8e8de
commit
d2a3c71bcd
8 changed files with 255 additions and 85 deletions
|
|
@ -35,6 +35,9 @@ class CdrWhatsappApi
|
|||
end
|
||||
|
||||
def send_message(recipient, text, options = {})
|
||||
post('send', { to: recipient.to_s, message: text }.merge(parse_hash(options)))
|
||||
params = { to: recipient.to_s, message: text }
|
||||
params[:attachments] = options[:attachments] if options[:attachments]
|
||||
options.delete(:attachments) if options[:attachments]
|
||||
post('send', params.merge(parse_hash(options)))
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue