summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Bex <peter@more-magic.net>2011-06-09 22:42:19 +0200
committerPeter Bex <peter@more-magic.net>2011-06-09 22:42:19 +0200
commit93a8cc9cdcf29af7e299ff2bb72ac0a635b9aa17 (patch)
treefcdd27f7559bf85d8f98204add3be78434e22c53
parent07e46d645ba8092110e89a518b9865cbed7248f2 (diff)
downloadsmsmatrix-93a8cc9cdcf29af7e299ff2bb72ac0a635b9aa17.tar.gz
Allow recipients to be a list of strings, for convenience
-rw-r--r--smsmatrix.scm3
1 files changed, 3 insertions, 0 deletions
diff --git a/smsmatrix.scm b/smsmatrix.scm
index 5fece6f..76333dc 100644
--- a/smsmatrix.scm
+++ b/smsmatrix.scm
@@ -246,6 +246,9 @@
username password group tts-fallback (error-on-failure #t))
(let-auth 'send-sms username password
(let* ((recipient-type (if group 'group 'phone))
+ (recipients (if (string? recipients)
+ recipients
+ (string-intersperse recipients ",")))
(res (api-request 'send-sms sms-uri `((username . ,username)
(password . ,password)
(,recipient-type . ,recipients)