Skip to content

Commit

Permalink
feat: update message with app creds and typos (#923)
Browse files Browse the repository at this point in the history
Co-authored-by: pierrick <[email protected]>
  • Loading branch information
PierrickVoulet and pierrick authored Oct 3, 2024
1 parent fb420a8 commit e7f7f1d
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 5 deletions.
11 changes: 9 additions & 2 deletions chat/client-libraries/cloud/update-message-app-cred.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,18 @@ async function main() {
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!',
cardsV2 : [{ card: { header: {
title: 'Card updated with app credential!',
imageUrl: '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.
updateMask: 'text'
updateMask: {
// The field paths to update.
paths: ['text', 'cards_v2']
}
};

// Make the request
Expand Down
5 changes: 4 additions & 1 deletion chat/client-libraries/cloud/update-message-user-cred.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,10 @@ async function main() {
},
// The field paths to update. Separate multiple values with commas or use
// `*` to update all field paths.
updateMask: 'text'
updateMask: {
// The field paths to update.
paths: ['text']
}
};

// Make the request
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ async function main() {
},
updateMask: {
// The field paths to update.
paths: ['lastReadTime']
paths: ['last_read_time']
}
};

Expand Down
5 changes: 4 additions & 1 deletion chat/client-libraries/cloud/update-space-user-cred.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,10 @@ async function main() {
},
// The field paths to update. Separate multiple values with commas or use
// `*` to update all field paths.
updateMask: 'displayName'
updateMask: {
// The field paths to update.
paths: ['display_name']
}
};

// Make the request
Expand Down

0 comments on commit e7f7f1d

Please sign in to comment.