Skip to main content
Version: 57.2.0

emitPayloadToAuthorizedRoom

emitPayloadToAuthorizedRoom(__namedParameters): Promise<void>

Generalized authorized-room emitter: iterates the sockets in room, runs the per-socket read-permission check against fullDocument, builds the payload per socket (so responseHandlers can tailor output to the receiving user), and emits eventName.

emitToAuthorizedRoom (legacy "sync" events) and the sync layer's sync:delta emission both delegate here.

Parameters

__namedParameters

buildPayload

(user) => unknown

Build the per-socket payload; a throw drops the emission for that socket only.

entry

AuthorizedEmitEntry

eventName

string

fullDocument

Record<string, unknown> | undefined

io

Server

logDebug

(msg) => void

room

string

Returns

Promise<void>