Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion async-collaboration/comments/customize-behavior.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -1856,10 +1856,14 @@ contactElement.getContactList().subscribe((response) => {

#### onContactSelected

- This event is triggered when a contact is selected from the contact dropdown in the Comment Dialog.
- This event is triggered every time a contact is selected from the contact dropdown in the Comment Dialog, regardless of the document's access type or whether the contact is a member.
- Use the event object to determine if the selected contact has access to the document using fields like `isOrganizationContact`, `isDocumentContact` and `documentAccessType`.
- If the selected contact doesn't have access to the document, you can show an invite dialog to the user to invite the contact to the document.

<Note>
As of SDK v6.0.0, this event fires for every contact selection. In earlier versions it only emitted for selections on `restricted` documents where the contact was not a document member, or for contacts without a `userId`. If your handler relied on that filter, gate it in your own code: `if (payload.documentAccessType === 'restricted' && !payload.isDocumentContact) { ... }`.
</Note>

The returned data will be in the following schema:

```jsx
Expand Down
16 changes: 16 additions & 0 deletions release-notes/version-6/sdk-changelog.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,22 @@ description: Release Notes of changes added to the core Velt SDK
- `@veltdev/sdk`
- `@veltdev/types`

<Update label="6.0.0" description="July 31, 2026">

### Breaking Changes

- [**Comments**]: `contactElement.onContactSelected()` and `useContactSelected()` now emit for every contact selection. Previously the event only emitted when the selected contact had no `userId`, or when the document was `restricted` and the selected contact was not a document member. To restore the previous filter, gate your handler with `if (payload.documentAccessType === 'restricted' && !payload.isDocumentContact) { ... }`. [Learn more →](/async-collaboration/comments/customize-behavior#oncontactselected)

### Improvements

- [**Comments**]: Every emission of `onContactSelected` now includes correctly-computed `isOrganizationContact` and `isDocumentContact` flags, derived from the organization and document contact lists for any contact that has a `userId`. Email-only contacts always report `false`. [Learn more →](/async-collaboration/comments/customize-behavior#oncontactselected)

### Bug Fixes

- [**Comments**]: When you use a user resolver (`dataProviders.user`) and it misses or fails for the logged-in user at page load, their name no longer renders as `User <userId>`. That placeholder is also no longer stamped into new comments, notification emails, or notification webhooks. Failed resolver attempts are no longer written to the user store, and the SDK schedules a bounded background retry at `2s / 8s / 30s` to re-resolve the logged-in user.

</Update>

<Update label="6.0.0-beta.15" description="July 29, 2026">

### New Features
Expand Down