Offline state and reconciliation
Understand what Drift persists, what remains online-only, and how recovery restores authoritative state.
Persisted state
- Confirmed scoped channel, membership, message, thread, reaction-summary, conversation, and unread entities.
- Validated deletion tombstones and independent entity versions.
- Bounded realtime recovery metadata, last accepted sequence, and push receipt deduplication state.
- Scope keys that isolate environment, application, and app-user sessions.
Never persisted
- Bearer tokens, application credentials, webhook secrets, signing keys, or cookies.
- Pending message bodies, mutation command queues, signed attachment URLs/headers, or attachment bytes.
- Remote cursors, connection tickets, WebSocket frames, typing state, presence state, or timers.
- Raw server errors, arbitrary response bodies, or unbounded custom payloads outside the released schema limits.
Compose Drift with v_chat_core
final store = DriftOfflineStore(executor: databaseExecutor);
final client = VChatClient(
options: VChatClientOptions(
appId: '00000000-0000-4000-8000-000000000001',
apiBaseUri: Uri.parse('https://api.example.com'),
),
tokenProvider: tokenProvider,
offlineStore: store,
);
try {
await client.connectUser(userId: 'current-user-id');
await client.conversations.refresh();
} finally {
await client.dispose();
}VChatClient initializes the supplied store and assumes ownership. Do not share one store or executor across clients that can dispose independently.
Reconnect recovery
Recovery can resume from retained event history or require bounded authoritative refresh. A gap, stale subscription, or refresh_required state pauses trust in local continuity until the SDK completes the documented REST reconciliation. Recovery never replays REST mutations or typing events.