Skip to content

Interface: ActivityStorageAdapter

@roomful/core


@roomful/core / ActivityStorageAdapter

Defined in: packages/core/src/engines/activity-storage.ts:13

A room-scoped persistence backend for the activity feed.

The activity engine calls load once on startup to restore entries (merged into the live feed), and save after every change with the full feed (newest first, already capped at the engine’s limit). Back it with Postgres, SQLite, Redis, a file, or any durable store — see docs/reference/activity-storage.md.

load(): Promise<readonly ActivityEntry[]>

Defined in: packages/core/src/engines/activity-storage.ts:19

Returns the persisted entries for the room (empty when there are none).

Promise<readonly ActivityEntry[]>

The stored entries.


save(entries): Promise<void>

Defined in: packages/core/src/engines/activity-storage.ts:28

Persists the full feed. Called after every change; an implementation may upsert or diff internally.

readonly ActivityEntry[]

The current feed to persist (newest first).

Promise<void>

A promise that resolves once the write completes.