mirror of https://github.com/caronc/apprise
Updated Notify_matrix (markdown)
parent
f19f1ad520
commit
f6d763f72e
|
@ -11,11 +11,11 @@ This can be done by specifying **?webhook=matrix** or **?webhook=slack**. Presu
|
|||
|
||||
### Syntax
|
||||
Valid syntaxes are as follows:
|
||||
* **matrix**://**{user}**:**{password}**@**{matrixhost}**/**#{room_alias}**
|
||||
* **matrixs**://**{user}**:**{password}**@**{matrixhost}**/**!{room_id}**
|
||||
* `matrix://{user}:{password}@{matrixhost}/#{room_alias}`
|
||||
* `matrixs://{user}:{password}@{matrixhost}/!{room_id}`
|
||||
|
||||
You can mix and match as many rooms as you wish:
|
||||
* **matrixs**://**{user}**:**{password}**@**{matrixhost}**/**!{room_id}**/**#{room_alias}**/
|
||||
* `matrixs://{user}:{password}@{matrixhost}/!{room_id}/#{room_alias}/`
|
||||
|
||||
**Note:** If no user and/or password is specified, then the matrix registration process is invoked. The matrix servers actually allow this (if enabled to do so in their configuration) to connect as a temporary user with/without a password and/or user-name. Under normal circumstances you should probably always supply a **{user}** and **{password}**.
|
||||
|
||||
|
@ -27,15 +27,23 @@ You can mix and match as many rooms as you wish:
|
|||
* **!def456:example.com** is not altered and is directly notified as such
|
||||
|
||||
When you specify the **?webhook=** argument you immediately shift entirely how this plugin works and the syntax becomes:
|
||||
* **matrix**://**{user}**:**{token}**@**{hostname}**?**webhook=matrix**
|
||||
* **matrixs**://**{token}**@**{hostname}**:**{port}**?**webhook=matrix**
|
||||
* **matrix**://**{user}**:**{token}**@**{hostname}**?**webhook=slack**&**format=markdown**
|
||||
* **matrixs**://**{token}**@**{hostname}**?**webhook=slack**&**format=markdown**
|
||||
* `matrix://{user}:{token}@{hostname}?webhook=matrix`
|
||||
* `matrixs://{token}@{hostname}:{port}?webhook=matrix`
|
||||
* `matrix://{user}:{token}@{hostname}?webhook=slack&format=markdown`
|
||||
* `matrixs://{token}@{hostname}?webhook=slack&format=markdown`
|
||||
|
||||
If you use [**t2bot.io**](https://t2bot.io/), then you can use the following URLs:
|
||||
* `matrix://{t2bot_webhook_token}`
|
||||
* `matrix://{user}@{t2bot_webhook_token}`
|
||||
|
||||
You can also just use the t2bot URL as they share it with you from their website:
|
||||
* `https://webhooks.t2bot.io/api/v1/matrix/hook/{t2bot_webhook_token}`
|
||||
|
||||
### Parameter Breakdown
|
||||
| Variable | Required | Description
|
||||
| ----------- | -------- | -----------
|
||||
| hostname | Yes | The matrix server you wish to connect to.
|
||||
| hostname | *Yes | The matrix server you wish to connect to.
|
||||
| t2bot_webhook_token | *Yes | This is effectively the hostname but acts as the t2bot webhook token if the mode is set to t2bot. Apprise is smart enough to determine the mode provided you follow the t2bot URL examples explained above. This field becomes the `hostname` in all other cases.
|
||||
| user | No | The user to authenticate (and/or register) with the matrix server
|
||||
| password | No | The password to authenticate (and/or register) with the matrix server
|
||||
| port | No | The server port Matrix is listening on. By default **matrixs://** uses a secure port port of **443** while **matrix://** uses port **80**.
|
||||
|
@ -54,4 +62,10 @@ Send a secure Matrix.org notification to our server
|
|||
# Assuming our {password} is abc123
|
||||
# Assuming the {room_alias} we want to notify is #general and #apprise
|
||||
apprise matrixs://nuxref:abc123@matrix.example.com/#general/#apprise
|
||||
```
|
||||
|
||||
Send a [**t2bot.io**](https://t2bot.io/) request:
|
||||
```bash
|
||||
# Assuming our {webhook} is ABCDEFG12345
|
||||
apprise matrix://ABCDEFG12345
|
||||
```
|
Loading…
Reference in New Issue