Skip to content

Commit

Permalink
feat: update message with app creds and fix typo (#1811)
Browse files Browse the repository at this point in the history
Co-authored-by: pierrick <pierrick@google.com>
  • Loading branch information
PierrickVoulet and pierrick authored Oct 3, 2024
1 parent 002711a commit d6f8334
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 6 additions & 2 deletions chat/client-libraries/cloud/update_message_app_cred.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,15 @@ def update_message_with_app_cred():
message = {
# Replace SPACE_NAME and MESSAGE_NAME here
"name": "spaces/SPACE_NAME/messages/MESSAGE_NAME",
"text": "Updated with app credential!"
"text": "Text updated with app credential!",
"cards_v2" : [{ "card": { "header": {
"title": 'Card updated with app credential!',
"image_url": 'https://fonts.gstatic.com/s/i/short-term/release/googlesymbols/info/default/24px.svg'
}}}]
},
# The field paths to update. Separate multiple values with commas or use
# `*` to update all field paths.
update_mask = "text"
update_mask = "text,cardsV2"
)

# Make the request
Expand Down
2 changes: 1 addition & 1 deletion chat/client-libraries/cloud/update_space_user_cred.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def update_space_with_user_cred():
'display_name': 'New space display name'
},
# The field paths to update. Separate multiple values with commas.
update_mask = 'display_name'
update_mask = 'displayName'
)

# Make the request
Expand Down

0 comments on commit d6f8334

Please sign in to comment.