ApiType aliases
MessagingEvents
Type Alias: MessagingEvents
type MessagingEvents = {
message: (msg: PlaintextMessage) => void;
read: (ev: {
at: number;
convId: string;
messageId: string;
userId: string;
}) => void;
typing: (ev: {
convId: string;
until: number;
userId: string;
}) => void;
viewing: (ev: {
convId: string;
until: number;
userId: string;
}) => void;
};Defined in: api/messaging/interface.ts:20
Event map for Messaging.on.
message is the only event currently wired end-to-end — it fires
whenever the bundle's WASM produces a plaintext message via the
messaging delegate. The presence events (typing, viewing, read)
are declared so consumers can subscribe today; the inbound delegate
slots that drive them are still being mapped — see TODO inside
bringup.ts#bringUpSession.
Properties
| Property | Type | Description | Defined in |
|---|---|---|---|
message | (msg: PlaintextMessage) => void | A decrypted plaintext message arrived. | api/messaging/interface.ts:22 |
read | (ev: { at: number; convId: string; messageId: string; userId: string; }) => void | Peer marked messageId read at at (ms epoch). | api/messaging/interface.ts:28 |
typing | (ev: { convId: string; until: number; userId: string; }) => void | Peer started typing in convId until until (ms epoch). | api/messaging/interface.ts:24 |
viewing | (ev: { convId: string; until: number; userId: string; }) => void | Peer is viewing convId until until (ms epoch). | api/messaging/interface.ts:26 |