WhatsApp/Signal/Formstack/admin updates

This commit is contained in:
Darren Clarke 2025-11-21 14:55:28 +01:00
parent bcecf61a46
commit d0cc5a21de
451 changed files with 16139 additions and 39623 deletions

View file

@ -35,6 +35,16 @@ class CdrSignalApi
end
def send_message(recipient, text, options = {})
post('send', { to: recipient.to_s, message: text }.merge(parse_hash(options)))
# Don't encode conversationId with CGI
params = { to: recipient.to_s, message: text }
if options[:conversationId]
params[:conversationId] = options[:conversationId]
options.delete(:conversationId)
end
if options[:attachments]
params[:attachments] = options[:attachments]
options.delete(:attachments)
end
post('send', params.merge(parse_hash(options)))
end
end