Add Matrix HTML format message documentation (#22372)

Co-authored-by: Franck Nijhof <frenck@frenck.nl>
This commit is contained in:
Erik J. Olson 2022-06-30 14:17:09 -05:00 committed by GitHub
parent 4d550fd16f
commit 5f85c78d57
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -183,6 +183,24 @@ The target room has to be precreated, the room id can be obtained from the rooms
To use notifications, please see the [getting started with automation page](/getting-started/automation/).
### Message formats
Matrix supports sending messages using a [limited HTML subset](https://spec.matrix.org/v1.2/client-server-api/#mroommessage-msgtypes). To specify the message format, add it in the notification `data`.
Supported formats are: `text` (default), and `html`.
```yaml
# Example of notification as HTML
action:
service: notify.matrix_notify
data:
message: >-
<h1>Hello, world!</h1>
data:
format: "html"
```
### Images in notification
It is possible to send images with notifications. To do so, add a list of paths in the notification `data`.