Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/communication/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
Release History
===============

1.1.2
++++++
* Add support for multiple SMS recipients.


1.1.1
++++++
* Fix codestyle issues in communiction command group.
Expand Down
2 changes: 1 addition & 1 deletion src/communication/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ az communication identity issue-access-token --scope chat voip --userid "8:acs:x
##### Send-SMS #####
```
az communication sms send-sms --sender "+1833xxxxxxx" \
--recipient "+1425xxxxxxx" --message "Hello there!!"
--recipient "+1425xxxxxxx" "+1426xxxxxxx" "+1427xxxxxxx" --message "Hello there!!"
```
##### List-Phonenumbers #####
```
Expand Down
4 changes: 2 additions & 2 deletions src/communication/azext_communication/manual/_help.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,12 +136,12 @@

helps['communication sms send-sms'] = """
type: command
short-summary: "Sends an SMS from the sender phone number to the recipient phone number."
short-summary: "Sends an SMS from the sender phone number to the recipient(s) phone number."
examples:
- name: send sms
text: |-
az communication sms send-sms --sender "+1833xxxxxxx" \
--recipient "+1425xxxxxxx" --message "Hello there!!"
--recipient "+1425xxxxxxx" "+1426xxxxxxx" "+1427xxxxxxx" --message "Hello there!!"
"""

helps['communication phonenumbers'] = """
Expand Down
3 changes: 2 additions & 1 deletion src/communication/azext_communication/manual/_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ def load_arguments(self, _):

with self.argument_context('communication sms send-sms') as c:
c.argument('sender', options_list=['--sender', '-s'], type=str, help='The sender of the SMS')
c.argument('recipient', options_list=['--recipient', '-r'], type=str, help='The recipient of the SMS')
c.argument('recipients', options_list=[
'--recipient', '-r'], nargs='+', help='The recipient(s) of the SMS')
c.argument('message', options_list=['--message', '-m'], type=str, help='The message in the SMS')

with self.argument_context('communication phonenumbers show-phonenumber') as c:
Expand Down
4 changes: 2 additions & 2 deletions src/communication/azext_communication/manual/custom.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ def issue_access_token(client, scopes, userid=None):
return user_token_data


def communication_send_sms(client, sender, recipient, message):
return client.send(from_=sender, to=recipient, message=message)
def communication_send_sms(client, sender, recipients, message):
return client.send(from_=sender, to=recipients, message=message)


def communication_list_phonenumbers(client):
Expand Down
Loading