Skip to content

Interface: ActivityEngine

@roomful/core


@roomful/core / ActivityEngine

Defined in: packages/core/src/types.ts:1919

A shared, bounded, newest-first feed of room activity. Every record is broadcast to peers and entries are ordered by timestamp, so all peers converge on the same recent feed. See docs/reference/engines-activity.md.

getEntries(): ActivityEntry[]

Defined in: packages/core/src/types.ts:1934

Returns the current feed, newest first.

ActivityEntry[]

The activity entries.


record(type, data?): ActivityEntry

Defined in: packages/core/src/types.ts:1927

Records an activity entry and broadcasts it to peers.

string

The activity type label.

unknown

An optional structured payload.

ActivityEntry

The recorded entry.


subscribe(callback): Unsubscribe

Defined in: packages/core/src/types.ts:1942

Subscribes to feed changes; fires immediately with the current feed, then on every change.

(entries) => void

The callback invoked with the latest entries.

Unsubscribe

A function that removes the listener.