Send to multiple receivers
Fan out a single message to multiple known receiver IDs in one send() call. DNotifier delivers to each recipient independently — there are no shared channels or subscriptions.
When to use receiverIds
Group chat (your app manages members)
Send to each member's user ID
Notify several dashboard sessions
List admin session IDs
Broadcast to a team
Your backend maintains the member list
The send() contract
senderId
Must match the connecting user's userId
receiverIds
Array of target user IDs (mutually exclusive with single receiverId)
data
Same JSON payload sent to every recipient
saveHistory
Optional; default true per recipient rules
{
"type": "text",
"text": "Hello everyone"
}Each recipient receives the same data object in their onMessage handler.
Delivery semantics
Recipients who are online receive the message immediately via
onMessageRecipients who are offline do not get live delivery
With
saveHistory: true, each recipient can load history when they reconnect (chat use case)
Language guides
JavaScript / TypeScript
Dart / Flutter
Related topics
Binary messaging —
sendBinaryalso acceptsreceiverIds
Last updated