mirror of
https://github.com/spantaleev/matrix-docker-ansible-deploy.git
synced 2025-09-22 22:08:15 +02:00
.github
docs
README.md
alternative-architectures.md
ansible.md
configuring-captcha.md
configuring-dns.md
configuring-playbook-base-domain-serving.md
configuring-playbook-bot-matrix-reminder-bot.md
configuring-playbook-bridge-appservice-discord.md
configuring-playbook-bridge-appservice-irc.md
configuring-playbook-bridge-appservice-slack.md
configuring-playbook-bridge-appservice-webhooks.md
configuring-playbook-bridge-matrix-bridge-sms.md
configuring-playbook-bridge-mautrix-facebook.md
configuring-playbook-bridge-mautrix-hangouts.md
configuring-playbook-bridge-mautrix-signal.md
configuring-playbook-bridge-mautrix-telegram.md
configuring-playbook-bridge-mautrix-whatsapp.md
configuring-playbook-bridge-mx-puppet-discord.md
configuring-playbook-bridge-mx-puppet-instagram.md
configuring-playbook-bridge-mx-puppet-skype.md
configuring-playbook-bridge-mx-puppet-slack.md
configuring-playbook-bridge-mx-puppet-steam.md
configuring-playbook-bridge-mx-puppet-twitter.md
configuring-playbook-client-element.md
configuring-playbook-dimension.md
configuring-playbook-dynamic-dns.md
configuring-playbook-email.md
configuring-playbook-email2matrix.md
configuring-playbook-external-postgres.md
configuring-playbook-federation.md
configuring-playbook-jitsi.md
configuring-playbook-ldap-auth.md
configuring-playbook-ma1sd.md
configuring-playbook-matrix-corporal.md
configuring-playbook-matrix-registration.md
configuring-playbook-nginx.md
configuring-playbook-own-webserver.md
configuring-playbook-rest-auth.md
configuring-playbook-riot-web.md
configuring-playbook-s3.md
configuring-playbook-shared-secret-auth.md
configuring-playbook-ssl-certificates.md
configuring-playbook-synapse-admin.md
configuring-playbook-synapse-simple-antispam.md
configuring-playbook-synapse.md
configuring-playbook-telemetry.md
configuring-playbook-turn.md
configuring-playbook.md
configuring-well-known.md
faq.md
getting-the-playbook.md
howto-server-delegation.md
importing-postgres.md
importing-synapse-media-store.md
importing-synapse-sqlite.md
installing.md
maintenance-and-troubleshooting.md
maintenance-checking-services.md
maintenance-migrating.md
maintenance-postgres.md
maintenance-synapse.md
maintenance-upgrading-services.md
prerequisites.md
registering-users.md
self-building.md
uninstalling.md
updating-users-passwords.md
examples
group_vars
inventory
roles
.editorconfig
.gitignore
CHANGELOG.md
LICENSE
README.md
ansible.cfg
setup.yml
64 lines
2.5 KiB
Markdown
64 lines
2.5 KiB
Markdown
# Setting up Appservice Webhooks (optional)
|
|
|
|
The playbook can install and configure [matrix-appservice-webhooks](https://github.com/turt2live/matrix-appservice-webhooks) for you.
|
|
|
|
This bridge provides support for Slack-compatible webhooks.
|
|
|
|
Setup Instructions:
|
|
|
|
loosely based on [this](https://github.com/turt2live/matrix-appservice-webhooks/blob/master/README.md)
|
|
|
|
1. All you basically need is to adjust your `inventory/host_vars/matrix.<domain-name>/vars.yml`:
|
|
|
|
```yaml
|
|
matrix_appservice_webhooks_enabled: true
|
|
matrix_appservice_webhooks_api_secret: '<your_secret>'
|
|
```
|
|
|
|
2. In case you want to change the verbosity of logging via `journalctl -fu matrix-appservice-webhooks.service`
|
|
you can adjust this in `inventory/host_vars/matrix.<domain-name>/vars.yml` as well.
|
|
|
|
*Note*: default value is: `info` and availabe log levels are : `info`, `verbose`
|
|
|
|
```yaml
|
|
matrix_appservice_webhooks_log_level: '<log_level>'
|
|
```
|
|
|
|
3. If you've already installed Matrix services using the playbook before, you'll need to re-run it (`--tags=setup-all,start`). If not, proceed with [configuring other playbook services](configuring-playbook.md) and then with [Installing](installing.md). Get back to this guide once ready.
|
|
|
|
4. If you're using the [Dimension Integration Manager](configuring-playbook-dimension.md), you can configure the Webhooks bridge by opening the Dimension integration manager -> Settings -> Bridges and selecting edit action for "Webhook Bridge". Press "Add self-hosted Bridge" button and populate "Provisioning URL" & "Shared Secret" values from `/matrix/appservice-webhooks/config/config.yaml` file's homeserver URL value and provisioning secret value, respectively.
|
|
|
|
5. Invite the bridge bot user to your room:
|
|
|
|
- either with `/invite @_webhook:<domain.name>` (*Note*: Make sure you have administration permissions in your room)
|
|
|
|
- or simply add the bridge bot to a private channel (personal channels imply you being an administrator)
|
|
|
|
6. Send a message to the bridge bot in order to receive a private message including the webhook link.
|
|
```
|
|
!webhook
|
|
```
|
|
|
|
7. The JSON body for posting messages will have to look like this:
|
|
```json
|
|
{
|
|
"text": "Hello world!",
|
|
"format": "plain",
|
|
"displayName": "My Cool Webhook",
|
|
"avatarUrl": "http://i.imgur.com/IDOBtEJ.png"
|
|
}
|
|
```
|
|
|
|
You can test this via curl like so:
|
|
|
|
```
|
|
curl --header "Content-Type: application/json" \
|
|
--data '{
|
|
"text": "Hello world!",
|
|
"format": "plain",
|
|
"displayName": "My Cool Webhook",
|
|
"avatarUrl": "http://i.imgur.com/IDOBtEJ.png"
|
|
}' \
|
|
<the link you've gotten in 5.>
|
|
```
|