Skip to content

Commit 7b36111

Browse files
authored
[Communication] add user-agent header for Rooms and Email service clients (#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
1 parent 1035130 commit 7b36111

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

src/communication/HISTORY.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@
33
Release History
44
===============
55

6+
1.5.1
7+
++++++
8+
* Add AzureCli to the user-agent header for Rooms and Email service clients
9+
10+
611
1.5.0
712
++++++
813
* Add communication email command group in preview mode

src/communication/azext_communication/manual/_client_factory.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,8 @@ def cf_communication_rooms(cli_ctx, kwargs):
7676
error_msg = 'Please specify --connection-string, or set AZURE_COMMUNICATION_CONNECTION_STRING.'
7777
raise RequiredArgumentMissingError(error_msg)
7878

79-
client = RoomsClient.from_connection_string(connection_string)
79+
args = {'user_agent': cli_application_id()}
80+
client = RoomsClient.from_connection_string(connection_string, **args)
8081
return client
8182

8283

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

91-
client = EmailClient.from_connection_string(connection_string)
92+
args = {'user_agent': cli_application_id()}
93+
client = EmailClient.from_connection_string(connection_string, **args)
9294
return client

src/communication/azext_communication/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# --------------------------------------------------------------------------------------------
55

66

7-
VERSION = '1.5.0'
7+
VERSION = '1.5.1'
88

99

1010
def cli_application_id():

0 commit comments

Comments
 (0)