js-bao-wss-client / DirectMessageEvent
Interface: DirectMessageEvent
A message a server function sent to this user or this connection.
Emitted over the directMessage event channel (client.on("directMessage", ...)) when a function calls ctx.users.send or ctx.connections.send while this client is connected. payload is the function's own value, passed through unread by the platform.
It is a LIVE frame with no durable record behind it: a client that was offline when the function ran does not receive it later. functionKey is the frame's only attribution — a function running in system mode acts for nobody, so there is no user to name.
Properties
functionKey
functionKey:
string
payload
payload:
unknown
sentAt
sentAt:
string
When the platform sent it, ISO 8601.
type
type:
"direct.message"