2023-02-20 21:21:02 +00:00
|
|
|
# Endpoint URL that Draupnir uses to interact with the matrix homeserver (client-server API),
|
2023-02-08 15:44:12 +00:00
|
|
|
# set this to the pantalaimon URL if you're using that.
|
2024-03-24 16:25:19 +00:00
|
|
|
homeserverUrl: {{ matrix_bot_draupnir_homeserver_url | to_json }}
|
2023-02-08 15:44:12 +00:00
|
|
|
|
2023-02-20 21:21:02 +00:00
|
|
|
# Endpoint URL that Draupnir could use to fetch events related to reports (client-server API and /_synapse/),
|
2023-02-08 15:44:12 +00:00
|
|
|
# only set this to the public-internet homeserver client API URL, do NOT set this to the pantalaimon URL.
|
2024-03-24 16:25:19 +00:00
|
|
|
rawHomeserverUrl: {{ matrix_bot_draupnir_raw_homeserver_url | to_json }}
|
2023-02-08 15:44:12 +00:00
|
|
|
|
2023-02-20 21:21:02 +00:00
|
|
|
# Matrix Access Token to use, Draupnir will only use this if pantalaimon.use is false.
|
2024-03-24 16:25:19 +00:00
|
|
|
accessToken: {{ matrix_bot_draupnir_access_token | to_json }}
|
2023-02-08 15:44:12 +00:00
|
|
|
|
2024-03-24 16:25:19 +00:00
|
|
|
{% if matrix_bot_draupnir_pantalaimon_use %}
|
2023-02-08 15:44:12 +00:00
|
|
|
# Options related to Pantalaimon (https://github.com/matrix-org/pantalaimon)
|
2024-03-24 16:25:19 +00:00
|
|
|
pantalaimon:
|
|
|
|
# Whether or not Draupnir will use pantalaimon to access the matrix homeserver,
|
|
|
|
# set to `true` if you're using pantalaimon.
|
|
|
|
#
|
|
|
|
# Be sure to point homeserverUrl to the pantalaimon instance.
|
|
|
|
#
|
|
|
|
# Draupnir will log in using the given username and password once,
|
|
|
|
# then store the resulting access token in a file under dataPath.
|
|
|
|
use: true
|
|
|
|
|
|
|
|
# The username to login with.
|
|
|
|
username: {{ matrix_bot_draupnir_pantalaimon_username | to_json }}
|
|
|
|
|
|
|
|
# The password Draupnir will login with.
|
|
|
|
#
|
|
|
|
# After successfully logging in once, this will be ignored, so this value can be blanked after first startup.
|
|
|
|
password: {{ matrix_bot_draupnir_pantalaimon_password | to_json }}
|
|
|
|
{% endif %}
|
2023-02-08 15:44:12 +00:00
|
|
|
|
2023-02-20 21:21:02 +00:00
|
|
|
# The path Draupnir will store its state/data in, leave default ("/data/storage") when using containers.
|
2023-02-08 15:44:12 +00:00
|
|
|
dataPath: "/data"
|
|
|
|
|
2023-02-20 21:21:02 +00:00
|
|
|
# If true (the default), Draupnir will only accept invites from users present in managementRoom.
|
2023-02-08 15:44:12 +00:00
|
|
|
autojoinOnlyIfManager: true
|
|
|
|
|
|
|
|
# If `autojoinOnlyIfManager` is false, only the members in this space can invite
|
|
|
|
# the bot to new rooms.
|
2023-03-02 02:58:03 +00:00
|
|
|
#acceptInvitesFromSpace: "!example:example.org"
|
2023-02-08 15:44:12 +00:00
|
|
|
|
2023-02-20 21:21:02 +00:00
|
|
|
# Whether Draupnir should report ignored invites to the management room (if autojoinOnlyIfManager is true).
|
2023-02-08 15:44:12 +00:00
|
|
|
recordIgnoredInvites: false
|
|
|
|
|
2023-02-20 21:21:02 +00:00
|
|
|
# The room ID (or room alias) of the management room, anyone in this room can issue commands to Draupnir.
|
2023-02-08 15:44:12 +00:00
|
|
|
#
|
2023-02-20 21:21:02 +00:00
|
|
|
# Draupnir has no more granular access controls other than this, be sure you trust everyone in this room - secure it!
|
2023-02-08 15:44:12 +00:00
|
|
|
#
|
|
|
|
# This should be a room alias or room ID - not a matrix.to URL.
|
|
|
|
#
|
2023-02-20 21:21:02 +00:00
|
|
|
# Note: By default, Draupnir is fairly verbose - expect a lot of messages in this room.
|
2023-02-08 15:44:12 +00:00
|
|
|
# (see verboseLogging to adjust this a bit.)
|
2024-03-24 16:25:19 +00:00
|
|
|
managementRoom: {{ matrix_bot_draupnir_management_room | to_json }}
|
2023-02-08 15:44:12 +00:00
|
|
|
|
2023-09-07 17:19:11 +00:00
|
|
|
# Deprecated and will be removed in a future version.
|
|
|
|
# Running with verboseLogging is unsupported.
|
2023-02-20 21:21:02 +00:00
|
|
|
# Whether Draupnir should log a lot more messages in the room,
|
2023-09-07 17:19:11 +00:00
|
|
|
# mainly involves "all-OK" messages, and debugging messages for when draupnir checks bans in a room.
|
|
|
|
#verboseLogging: false
|
2023-02-08 15:44:12 +00:00
|
|
|
|
|
|
|
# The log level of terminal (or container) output,
|
|
|
|
# can be one of DEBUG, INFO, WARN and ERROR, in increasing order of importance and severity.
|
|
|
|
#
|
2023-02-20 21:21:02 +00:00
|
|
|
# This should be at INFO or DEBUG in order to get support for Draupnir problems.
|
2023-02-08 15:44:12 +00:00
|
|
|
logLevel: "INFO"
|
|
|
|
|
2023-02-20 21:21:02 +00:00
|
|
|
# Whether or not Draupnir should synchronize policy lists immediately after startup.
|
2023-02-08 15:44:12 +00:00
|
|
|
# Equivalent to running '!draupnir sync'.
|
|
|
|
syncOnStartup: true
|
|
|
|
|
2023-02-20 21:21:02 +00:00
|
|
|
# Whether or not Draupnir should check moderation permissions in all protected rooms on startup.
|
2023-02-08 15:44:12 +00:00
|
|
|
# Equivalent to running `!draupnir verify`.
|
|
|
|
verifyPermissionsOnStartup: true
|
|
|
|
|
2023-02-20 21:21:02 +00:00
|
|
|
# Whether or not Draupnir should actually apply bans and policy lists,
|
2023-02-08 15:44:12 +00:00
|
|
|
# turn on to trial some untrusted configuration or lists.
|
|
|
|
noop: false
|
|
|
|
|
2023-09-07 17:19:11 +00:00
|
|
|
# Whether or not Draupnir should apply `m.room.server_acl` events.
|
|
|
|
# DO NOT change this to `true` unless you are very confident that you know what you are doing.
|
2024-03-24 16:25:19 +00:00
|
|
|
disableServerACL: {{ matrix_bot_draupnir_disable_server_acl | to_json }}
|
2023-09-07 17:19:11 +00:00
|
|
|
|
2023-02-20 21:21:02 +00:00
|
|
|
# Whether Draupnir should check member lists quicker (by using a different endpoint),
|
2023-02-08 15:44:12 +00:00
|
|
|
# keep in mind that enabling this will miss invited (but not joined) users.
|
|
|
|
#
|
|
|
|
# Turn on if your bot is in (very) large rooms, or in large amounts of rooms.
|
|
|
|
fasterMembershipChecks: false
|
|
|
|
|
|
|
|
# A case-insensitive list of ban reasons to have the bot also automatically redact the user's messages for.
|
|
|
|
#
|
|
|
|
# If the bot sees you ban a user with a reason that is an (exact case-insensitive) match to this list,
|
|
|
|
# it will also remove the user's messages automatically.
|
|
|
|
#
|
|
|
|
# Typically this is useful to avoid having to give two commands to the bot.
|
|
|
|
# Advanced: Use asterisks to have the reason match using "globs"
|
|
|
|
# (f.e. "spam*testing" would match "spam for testing" as well as "spamtesting").
|
|
|
|
#
|
|
|
|
# See here for more info: https://www.digitalocean.com/community/tools/glob
|
|
|
|
# Note: Keep in mind that glob is NOT regex!
|
|
|
|
automaticallyRedactForReasons:
|
|
|
|
- "spam"
|
|
|
|
- "advertising"
|
|
|
|
|
2023-02-20 21:21:02 +00:00
|
|
|
# A list of rooms to protect. Draupnir will add this to the list it knows from its account data.
|
2023-02-08 15:44:12 +00:00
|
|
|
#
|
|
|
|
# It won't, however, add it to the account data.
|
|
|
|
# Manually add the room via '!draupnir rooms add' to have it stay protected regardless if this config value changes.
|
|
|
|
#
|
|
|
|
# Note: These must be matrix.to URLs
|
|
|
|
#protectedRooms:
|
|
|
|
# - "https://matrix.to/#/#yourroom:example.org"
|
|
|
|
|
|
|
|
# Whether or not to add all joined rooms to the "protected rooms" list
|
|
|
|
# (excluding the management room and watched policy list rooms, see below).
|
|
|
|
#
|
|
|
|
# Note that this effectively makes the protectedRooms and associated commands useless
|
|
|
|
# for regular rooms.
|
|
|
|
#
|
|
|
|
# Note: the management room is *excluded* from this condition.
|
|
|
|
# Explicitly add it as a protected room to protect it.
|
|
|
|
#
|
|
|
|
# Note: Ban list rooms the bot is watching but didn't create will not be protected.
|
|
|
|
# Explicitly add these rooms as a protected room list if you want them protected.
|
|
|
|
protectAllJoinedRooms: false
|
|
|
|
|
2023-02-20 21:21:02 +00:00
|
|
|
# Increase this delay to have Draupnir wait longer between two consecutive backgrounded
|
2023-02-08 15:44:12 +00:00
|
|
|
# operations. The total duration of operations will be longer, but the homeserver won't
|
2023-02-20 21:21:02 +00:00
|
|
|
# be affected as much. Conversely, decrease this delay to have Draupnir chain operations
|
2023-02-08 15:44:12 +00:00
|
|
|
# faster. The total duration of operations will generally be shorter, but the performance
|
|
|
|
# of the homeserver may be more impacted.
|
|
|
|
backgroundDelayMS: 500
|
|
|
|
|
2023-02-20 21:21:02 +00:00
|
|
|
# Server administration commands, these commands will only work if Draupnir is
|
2023-02-08 15:44:12 +00:00
|
|
|
# a global server administrator, and the bot's server is a Synapse instance.
|
2023-02-20 21:21:02 +00:00
|
|
|
admin:
|
|
|
|
# Whether or not Draupnir can temporarily take control of any eligible account from the local homeserver who's in the room
|
|
|
|
# (with enough permissions) to "make" a user an admin.
|
|
|
|
#
|
|
|
|
# This only works if a local user with enough admin permissions is present in the room.
|
2023-03-02 02:58:03 +00:00
|
|
|
enableMakeRoomAdminCommand: false
|
2023-02-08 15:44:12 +00:00
|
|
|
|
|
|
|
# Misc options for command handling and commands
|
|
|
|
commands:
|
|
|
|
# Whether or not the `!draupnir` prefix is necessary to submit commands.
|
|
|
|
#
|
|
|
|
# If `true`, will allow commands like `!ban`, `!help`, etc.
|
|
|
|
#
|
2023-02-20 21:21:02 +00:00
|
|
|
# Note: Draupnir can also be pinged by display name instead of having to use
|
2023-02-08 15:44:12 +00:00
|
|
|
# the !draupnir prefix. For example, "my_moderator_bot: ban @spammer:example.org"
|
|
|
|
# will address only my_moderator_bot.
|
|
|
|
allowNoPrefix: false
|
|
|
|
|
2023-02-20 21:21:02 +00:00
|
|
|
# Any additional bot prefixes that Draupnir will listen to. i.e. adding `mod` will allow `!mod help`.
|
2023-02-08 15:44:12 +00:00
|
|
|
additionalPrefixes:
|
2023-02-20 21:21:02 +00:00
|
|
|
- "draupnir-bot"
|
2023-03-02 02:58:03 +00:00
|
|
|
- "draupnir_bot"
|
2023-02-08 19:05:47 +00:00
|
|
|
- "draupnir"
|
2023-02-08 15:44:12 +00:00
|
|
|
|
|
|
|
# Whether or not commands with a wildcard (*) will require an additional `--force` argument
|
|
|
|
# in the command to be able to be submitted.
|
|
|
|
confirmWildcardBan: true
|
|
|
|
|
2023-02-20 21:21:02 +00:00
|
|
|
# The default reasons to be prompted with if the reason is missing from a ban command.
|
|
|
|
ban:
|
2024-03-24 16:25:19 +00:00
|
|
|
defaultReasons:
|
2023-02-20 21:21:02 +00:00
|
|
|
- "spam"
|
|
|
|
- "brigading"
|
|
|
|
- "harassment"
|
|
|
|
- "disagreement"
|
|
|
|
|
2023-02-08 15:44:12 +00:00
|
|
|
# Configuration specific to certain toggle-able protections
|
|
|
|
#protections:
|
|
|
|
# # Configuration for the wordlist plugin, which can ban users based if they say certain
|
|
|
|
# # blocked words shortly after joining.
|
|
|
|
# wordlist:
|
|
|
|
# # A list of case-insensitive keywords that the WordList protection will watch for from new users.
|
|
|
|
# #
|
|
|
|
# # WordList will ban users who use these words when first joining a room, so take caution when selecting them.
|
|
|
|
# #
|
|
|
|
# # For advanced usage, regex can also be used, see the following links for more information;
|
|
|
|
# # - https://www.digitalocean.com/community/tutorials/an-introduction-to-regular-expressions
|
|
|
|
# # - https://regexr.com/
|
|
|
|
# # - https://regexone.com/
|
|
|
|
# words:
|
|
|
|
# - "LoReM"
|
|
|
|
# - "IpSuM"
|
|
|
|
# - "DoLoR"
|
|
|
|
# - "aMeT"
|
|
|
|
#
|
|
|
|
# # For how long (in minutes) the user is "new" to the WordList plugin.
|
|
|
|
# #
|
|
|
|
# # After this time, the user will no longer be banned for using a word in the above wordlist.
|
|
|
|
# #
|
|
|
|
# # Set to zero to disable the timeout and make users *always* appear "new".
|
|
|
|
# # (users will always be banned if they say a bad word)
|
|
|
|
# minutesBeforeTrusting: 20
|
|
|
|
|
|
|
|
# Options for advanced monitoring of the health of the bot.
|
|
|
|
health:
|
|
|
|
# healthz options. These options are best for use in container environments
|
|
|
|
# like Kubernetes to detect how healthy the service is. The bot will report
|
|
|
|
# that it is unhealthy until it is able to process user requests. Typically
|
|
|
|
# this means that it'll flag itself as unhealthy for a number of minutes
|
|
|
|
# before saying "Now monitoring rooms" and flagging itself healthy.
|
|
|
|
#
|
|
|
|
# Health is flagged through HTTP status codes, defined below.
|
|
|
|
healthz:
|
|
|
|
# Whether the healthz integration should be enabled (default false)
|
|
|
|
enabled: false
|
|
|
|
|
|
|
|
# The port to expose the webserver on. Defaults to 8080.
|
|
|
|
port: 8080
|
|
|
|
|
|
|
|
# The address to listen for requests on. Defaults to all addresses.
|
|
|
|
address: "0.0.0.0"
|
|
|
|
|
|
|
|
# The path to expose the monitoring endpoint at. Defaults to `/healthz`
|
|
|
|
endpoint: "/healthz"
|
|
|
|
|
|
|
|
# The HTTP status code which reports that the bot is healthy/ready to
|
|
|
|
# process requests. Typically this should not be changed. Defaults to
|
|
|
|
# 200.
|
|
|
|
healthyStatus: 200
|
|
|
|
|
|
|
|
# The HTTP status code which reports that the bot is not healthy/ready.
|
|
|
|
# Defaults to 418.
|
|
|
|
unhealthyStatus: 418
|
|
|
|
|
|
|
|
# Options for exposing web APIs.
|
|
|
|
#web:
|
|
|
|
# # Whether to enable web APIs.
|
|
|
|
# enabled: false
|
|
|
|
#
|
|
|
|
# # The port to expose the webserver on. Defaults to 8080.
|
|
|
|
# port: 8080
|
|
|
|
#
|
|
|
|
# # The address to listen for requests on. Defaults to only the current
|
|
|
|
# # computer.
|
|
|
|
# address: localhost
|
|
|
|
#
|
|
|
|
# # Alternative setting to open to the entire web. Be careful,
|
|
|
|
# # as this will increase your security perimeter:
|
|
|
|
# #
|
|
|
|
# # address: "0.0.0.0"
|
|
|
|
#
|
|
|
|
# # A web API designed to intercept Matrix API
|
|
|
|
# # POST /_matrix/client/r0/rooms/{roomId}/report/{eventId}
|
|
|
|
# # and display readable abuse reports in the moderation room.
|
|
|
|
# #
|
|
|
|
# # If you wish to take advantage of this feature, you will need
|
|
|
|
# # to configure a reverse proxy, see e.g. test/nginx.conf
|
|
|
|
# abuseReporting:
|
|
|
|
# # Whether to enable this feature.
|
|
|
|
# enabled: false
|
|
|
|
|
|
|
|
# Whether or not to actively poll synapse for abuse reports, to be used
|
|
|
|
# instead of intercepting client calls to synapse's abuse endpoint, when that
|
|
|
|
# isn't possible/practical.
|
|
|
|
pollReports: false
|
|
|
|
|
|
|
|
# Whether or not new reports, received either by webapi or polling,
|
|
|
|
# should be printed to our managementRoom.
|
|
|
|
displayReports: false
|