mirror of
https://github.com/crazy-max/diun.git
synced 2024-11-24 16:06:46 +00:00
52 lines
2.3 KiB
Markdown
52 lines
2.3 KiB
Markdown
# Matrix notifications
|
|
|
|
Allow sending notifications to your Matrix server.
|
|
|
|
## Configuration
|
|
|
|
!!! example "File"
|
|
```yaml
|
|
notif:
|
|
matrix:
|
|
homeserverURL: https://matrix.org
|
|
user: "@foo:matrix.org"
|
|
password: bar
|
|
roomID: "!abcdefGHIjklmno:matrix.org"
|
|
msgType: notice
|
|
templateBody: |
|
|
Docker tag {{ .Entry.Image }} which you subscribed to through {{ .Entry.Provider }} provider has been released.
|
|
```
|
|
|
|
| Name | Default | Description |
|
|
|--------------------|------------------------------------|---------------------------------------------------------------------------------|
|
|
| `homeserverURL` | `https://matrix.org` | Matrix server URL |
|
|
| `user` | | Username for authentication |
|
|
| `userFile` | | Use content of secret file as username authentication if `username` not defined |
|
|
| `password` | | Password for authentication |
|
|
| `passwordFile` | | Use content of secret file as password authentication if `password` not defined |
|
|
| `roomID` | | Room ID to send messages |
|
|
| `msgType` | `notice` | Type of message being sent. Can be `notice` or `text` |
|
|
| `templateBody`[^1] | See [below](#default-templatebody) | [Notification template](../faq.md#notification-template) for message body |
|
|
|
|
!!! abstract "Environment variables"
|
|
* `DIUN_NOTIF_MATRIX_HOMESERVERURL`
|
|
* `DIUN_NOTIF_MATRIX_USER`
|
|
* `DIUN_NOTIF_MATRIX_USERFILE`
|
|
* `DIUN_NOTIF_MATRIX_PASSWORD`
|
|
* `DIUN_NOTIF_MATRIX_PASSWORDFILE`
|
|
* `DIUN_NOTIF_MATRIX_ROOMID`
|
|
* `DIUN_NOTIF_MATRIX_MSGTYPE`
|
|
* `DIUN_NOTIF_MATRIX_TEMPLATEBODY`
|
|
|
|
### Default `templateBody`
|
|
|
|
```
|
|
[[ config.extra.template.notif.defaultBody ]]
|
|
```
|
|
|
|
## Sample
|
|
|
|
![](../assets/notif/matrix.png)
|
|
|
|
[^1]: Value required
|