Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs: Detail method to send a notification to all users #1283

Merged
merged 2 commits into from
Sep 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@joepavitt I noticed and fixed a typo that isn't related to the docs update in this PR but falls under the "multi-tenancy" section. I came across it while reviewing the link provided in the docs: "You can read more about this here."


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

Expand Down
Loading