Skip to content

Commit

Permalink
[Communication] add user-agent header for Rooms and Email service cli…
Browse files Browse the repository at this point in the history
…ents (#5829)

* [Communication] update communication module version to 1.4.1, remove redundant version in setup

* [Communication] add email command group in preview mode

* fix typo in email status get parameter setup

* Add more help for email commands.

* [Communication] add user-agent header for Rooms and Email service clients
  • Loading branch information
mayssamm authored Feb 3, 2023
1 parent 1035130 commit 7b36111
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
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.5.1
++++++
* Add AzureCli to the user-agent header for Rooms and Email service clients


1.5.0
++++++
* Add communication email command group in preview mode
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,8 @@ def cf_communication_rooms(cli_ctx, kwargs):
error_msg = 'Please specify --connection-string, or set AZURE_COMMUNICATION_CONNECTION_STRING.'
raise RequiredArgumentMissingError(error_msg)

client = RoomsClient.from_connection_string(connection_string)
args = {'user_agent': cli_application_id()}
client = RoomsClient.from_connection_string(connection_string, **args)
return client


Expand All @@ -88,5 +89,6 @@ def cf_communication_email(cli_ctx, kwargs):
error_msg = 'Please specify --connection-string, or set AZURE_COMMUNICATION_CONNECTION_STRING.'
raise RequiredArgumentMissingError(error_msg)

client = EmailClient.from_connection_string(connection_string)
args = {'user_agent': cli_application_id()}
client = EmailClient.from_connection_string(connection_string, **args)
return client
2 changes: 1 addition & 1 deletion src/communication/azext_communication/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# --------------------------------------------------------------------------------------------


VERSION = '1.5.0'
VERSION = '1.5.1'


def cli_application_id():
Expand Down

0 comments on commit 7b36111

Please sign in to comment.