Use Claude Code to sync docs with Browser and Node SDKs#657
Use Claude Code to sync docs with Browser and Node SDKs#657
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Sync docs with Browser and Node SDKs by adding client registration checks, identifier-based conversation APIs, storage management, and sidebar linkAdd Browser/Node code samples for 📍Where to StartStart with the new Browser storage documentation in browser-storage.mdx, then review the sidebar addition in shared-sidebar.config.ts and sample updates in the core messaging pages. Macroscope summarized 3ed32b6. |
ade6a00 to
486fb39
Compare
|
|
||
| ::: | ||
|
|
||
| ## Check if client is registered |
| ) | ||
| ``` | ||
|
|
||
| ```tsx [React Native] |
There was a problem hiding this comment.
jha fix order of samples here
| After a user calls `leaveGroup()`, you can check if their removal is still being processed using the `membershipState()` method. This is useful for showing appropriate UI while the group removal is being finalized. | ||
| After a user requests to leave a group, you can check if their removal is still being processed. This is useful for showing appropriate UI while the group removal is being finalized. | ||
|
|
||
| :::code-group |
There was a problem hiding this comment.
looks like Browser and Node do this differently than mobile
| // Check if current user created the DM | ||
| const isDmCreator = dm.isCreator; | ||
| ``` | ||
|
|
There was a problem hiding this comment.
isCreator is not in RN
| } | ||
| ``` | ||
|
|
||
| ## Generate and look up inbox IDs |
There was a problem hiding this comment.
Browser/Node only, mobile
SDKs use it internally but don't expose it
|
|
||
| ::: | ||
|
|
||
| ## Change the recovery identity |
There was a problem hiding this comment.
not available in mobile SDKs
19a37f9 to
13dcecb
Compare
|
|
||
| ```js [Node] | ||
| // Check if the client is registered | ||
| const registered = await client.isRegistered(); |
There was a problem hiding this comment.
this should be
const registered = client.isRegistered;
or just replace that bit and change the if statement below to
if (!client.isRegistered) {
// Register the client manually
await client.register();
}
| // Create a group using identifiers instead of inbox IDs | ||
| const group = await client.conversations.createGroupWithIdentifiers( | ||
| memberIdentifiers, | ||
| { name: "Group Name", description: "Group description" } |
There was a problem hiding this comment.
this should be
{ groupName: "Group Name", groupDescription: "Group description" }
| // Create a group using identifiers instead of inbox IDs | ||
| const group = await client.conversations.createGroupWithIdentifiers( | ||
| memberIdentifiers, | ||
| { name: "Group Name", description: "Group description" } |
There was a problem hiding this comment.
same as above
{ groupName: "Group Name", groupDescription: "Group description" }
| // Delete a message by its ID | ||
| await conversation.deleteMessage(messageId); | ||
| ``` | ||
|
|
There was a problem hiding this comment.
deleteMessage is not part of the browser and node SDK yet
| console.log(`Failed to delete message: ${error}`); | ||
| } | ||
| ``` | ||
|
|
No description provided.