Skip to content

Commit

Permalink
Update docs/configuring-playbook-bot-draupnir.md and docs/configuring…
Browse files Browse the repository at this point in the history
…-playbook-bot-mjolnir.md: small edits

Signed-off-by: Suguru Hirahara <[email protected]>
  • Loading branch information
Suguru Hirahara committed Dec 12, 2024
1 parent 9f02a15 commit 5849d83
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions docs/configuring-playbook-bot-draupnir.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ You can use the playbook to [register a new user](registering-users.md):
ansible-playbook -i inventory/hosts setup.yml --extra-vars='username=bot.draupnir password=PASSWORD_FOR_THE_BOT admin=no' --tags=register-user
```

If you would like Draupnir to be able to deactivate users, move aliases, shutdown rooms, show abuse reports ([see below](#abuse-reports)), etc then it must be a server admin so you need to change `admin=no` to `admin=yes` in the command above.
If you would like Draupnir to be able to deactivate users, move aliases, shutdown rooms, show abuse reports (see [below](#abuse-reports)), etc then it must be a server admin so you need to change `admin=no` to `admin=yes` in the command above.

### Get an access token

Expand All @@ -46,7 +46,7 @@ The APIs can also be accessed via [Synapse Admin](https://github.com/etkecc/syna
**Note**: access to the APIs is restricted with a valid access token, so exposing them publicly should not be a real security concern. Still, doing so is not recommended for additional security. See [official Synapse reverse-proxying recommendations](https://element-hq.github.io/synapse/latest/reverse_proxy.html#synapse-administration-endpoints).
To discharge rate limiting, run the following command on systems that ship curl (note that it does not work on outdated Windows 10). Even if the APIs are not exposed to the internet, you should still be able to run the command on the homeserver locally. Before running it, make sure to replace `@bot.draupnir:example.com` with the MXID of your Draupnir and `example.com` with your homeserver domain:
To discharge rate limiting, run the following command on systems that ship curl (note that it does not work on outdated Windows 10). Even if the APIs are not exposed to the internet, you should still be able to run the command on the homeserver locally. Before running it, make sure to replace `@bot.draupnir:example.com` with the MXID of your Draupnir and `example.com` with your homeserver domain, respectively:

```sh
curl --header "Authorization: Bearer <access_token>" -X POST https://matrix.example.com/_synapse/admin/v1/users/@bot.draupnir:example.com/override_ratelimit
Expand Down Expand Up @@ -242,7 +242,7 @@ The first method intercepts the report API endpoint of the client-server API, wh
matrix_bot_draupnir_abuse_reporting_enabled: true
```

The other method polls an synapse admin API endpoint and is hence only available when using synapse and when the Draupnir user is an admin user ([see above](#register-the-bot-account)). To enable it, set `pollReports: true` in Draupnir's config:
The other method polls an synapse admin API endpoint and is hence only available when using synapse and when the Draupnir user is an admin user (see [above](#register-the-bot-account)). To enable it, set `pollReports: true` in Draupnir's config:

```yaml
matrix_bot_draupnir_configuration_extension_yaml: |
Expand Down
2 changes: 1 addition & 1 deletion docs/configuring-playbook-bot-mjolnir.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ The APIs can also be accessed via [Synapse Admin](https://github.com/etkecc/syna
**Note**: access to the APIs is restricted with a valid access token, so exposing them publicly should not be a real security concern. Still, doing so is not recommended for additional security. See [official Synapse reverse-proxying recommendations](https://element-hq.github.io/synapse/latest/reverse_proxy.html#synapse-administration-endpoints).
To discharge rate limiting, run the following command on systems that ship curl (note that it does not work on outdated Windows 10). Even if the APIs are not exposed to the internet, you should still be able to run the command on the homeserver locally. Before running it, make sure to replace `@bot.mjolnir:example.com` with the MXID of your Mjolnir and `example.com` with your homeserver domain:
To discharge rate limiting, run the following command on systems that ship curl (note that it does not work on outdated Windows 10). Even if the APIs are not exposed to the internet, you should still be able to run the command on the homeserver locally. Before running it, make sure to replace `@bot.mjolnir:example.com` with the MXID of your Mjolnir and `example.com` with your homeserver domain, respectively:

```sh
curl --header "Authorization: Bearer <access_token>" -X POST https://matrix.example.com/_synapse/admin/v1/users/@bot.mjolnir:example.com/override_ratelimit
Expand Down

0 comments on commit 5849d83

Please sign in to comment.