Skip to content
Open
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
22 changes: 11 additions & 11 deletions docs/pages/chat-apps/list-stream-sync/history-sync.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ The following methods accept an optional options parameter that controls what da
| --- | --- | --- |
| `startNs` | `nil`/`null` | Start timestamp in nanoseconds to filter the archive to a time range |
| `endNs` | `nil`/`null` | End timestamp in nanoseconds to filter the archive to a time range |
| `archiveElements` | `[messages, consent]` | What to include in the archive: `messages`, `consent`, or both |
| `elements` | `[BackupElementSelectionOption.Consent, BackupElementSelectionOption.Messages]` | What to include in the archive: `messages`, `consent`, or both |
| `excludeDisappearingMessages` | `false` | Whether to exclude disappearing messages from the archive |

Calling these methods without the options parameter includes all messages and consent data.
Expand All @@ -98,23 +98,23 @@ Send a request to other installations to sync conversations and messages to the
:::code-group

```js [Browser]
// With default options
// With default options (syncs consent and messages to default server)
await client.sendSyncRequest();

// With custom options
await client.sendSyncRequest(
{ archiveElements: ["consent"] }, // options
{ elements: [BackupElementSelectionOption.Consent] }, // options
"https://your-history-sync-server.example.com/" // serverUrl
);
```

```js [Node]
// With default options
// With default options (syncs consent and messages to default server)
await client.sendSyncRequest();

// With custom options
await client.sendSyncRequest(
{ archiveElements: ["consent"] }, // options
{ elements: [BackupElementSelectionOption.Consent] }, // options
"https://your-history-sync-server.example.com/" // serverUrl
);
```
Expand Down Expand Up @@ -154,25 +154,25 @@ Send an archive to the sync group without waiting for a request from another ins
:::code-group

```js [Browser]
// With default options
// With default options (syncs consent and messages to default server)
await client.sendSyncArchive("my-pin");

// With custom options
await client.sendSyncArchive(
"my-pin", // pin
{ archiveElements: ["consent"] }, // options
{ elements: [BackupElementSelectionOption.Consent] }, // options
"https://your-history-sync-server.example.com/" // serverUrl
);
```

```js [Node]
// With default options
// With default options (syncs consent and messages to default server)
await client.sendSyncArchive("my-pin");

// With custom options
await client.sendSyncArchive(
"my-pin", // pin
{ archiveElements: ["consent"] }, // options
{ elements: [BackupElementSelectionOption.Consent] }, // options
"https://your-history-sync-server.example.com/" // serverUrl
);
```
Expand Down Expand Up @@ -233,12 +233,12 @@ Get a list of archives available for import from the sync group. This method rea

```js [Browser]
// List archives from the last 30 days
const archives = await client.listAvailableArchives(BigInt(30));
const archives = await client.listAvailableArchives(30);
```

```js [Node]
// List archives from the last 30 days
const archives = await client.listAvailableArchives(BigInt(30));
const archives = client.listAvailableArchives(30);
```

```kotlin [Kotlin]
Expand Down