Skip to content

Commit f9a39af

Browse files
PierrickVouletpierrick
and
pierrick
authored
feat: update message with app creds (#490)
Co-authored-by: pierrick <[email protected]>
1 parent 0b0d728 commit f9a39af

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

chat/advanced-service/Main.gs

+6-2
Original file line numberDiff line numberDiff line change
@@ -741,11 +741,15 @@ function updateMessageAppCred() {
741741
// TODO(developer): Replace SPACE_NAME and MESSAGE_NAME here
742742
const name = 'spaces/SPACE_NAME/messages/MESSAGE_NAME';
743743
const message = {
744-
text: 'Updated with app credential!'
744+
text: 'Text updated with app credential!',
745+
cardsV2 : [{ card: { header: {
746+
title: 'Card updated with app credential!',
747+
imageUrl: 'https://fonts.gstatic.com/s/i/short-term/release/googlesymbols/info/default/24px.svg'
748+
}}}]
745749
};
746750
// The field paths to update. Separate multiple values with commas or use
747751
// `*` to update all field paths.
748-
const updateMask = 'text';
752+
const updateMask = 'text,cardsV2';
749753

750754
// Make the request
751755
const response = Chat.Spaces.Messages.patch(message, name, {

0 commit comments

Comments
 (0)