Skip to content

Commit

Permalink
Merge pull request #1283 from FlowFuse/notifications-send-to-all
Browse files Browse the repository at this point in the history
Docs: Detail method to send a notification to all users
  • Loading branch information
gayanSandamal authored Sep 11, 2024
2 parents a371146 + 874253c commit a62ca12
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions docs/nodes/widgets/ui-notification.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,3 +82,9 @@ This notification was created using a `msg.payload` of:
```html
<h3>Generated Notification</h3><p>This is custom HTML injected into <b>Node-RED</b></p>
```

### Sending to all clients

Notifications are, by default, constrained to send to a single user/client. In Dashboard 2.0 this constraint is defined by `msg._client`. You can read more about this [here](../../user/multi-tenancy.md#configuring-client-data).

If you want to send a notification to _all_ connected clients, you can remove the `msg._client` value using a "change" node, configured to "Delete" the `_client` property.
2 changes: 1 addition & 1 deletion docs/user/multi-tenancy.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ In the [Dashboard sidebar](./sidebar.md#client-data) within the Node-RED Editor,
<img data-zoomable style="max-width: 400px; margin: auto;" src="/images/dashboard-sidebar-clientdata.png" alt="Screenshot of an example 'Client Data' tab"/>
<em>Screenshot of an example "Client Data" tab</em>

Client data defines information on the user/client interacting with the Dashboard. This data can be appended to every `msg` a node emits, underneath teh `msg._client` object.
Client data defines information on the user/client interacting with the Dashboard. This data can be appended to every `msg` a node emits, underneath the `msg._client` object.

When "Include Client Data" is enabled, every `msg._client` will detail the `socketId` and `socketIp` of any connected users.

Expand Down

0 comments on commit a62ca12

Please sign in to comment.