2018-08-13 00:00:23 +02:00
|
|
|
# Homeserver details.
|
|
|
|
homeserver:
|
|
|
|
# The address that this appservice can use to connect to the homeserver.
|
|
|
|
address: https://matrix.org
|
|
|
|
# The domain of the homeserver (for MXIDs, etc).
|
|
|
|
domain: matrix.org
|
|
|
|
|
|
|
|
# Application service host/registration related details.
|
|
|
|
# Changing these values requires regeneration of the registration.
|
|
|
|
appservice:
|
|
|
|
# The address that the homeserver can use to connect to this appservice.
|
|
|
|
address: http://localhost:8080
|
|
|
|
|
|
|
|
# The hostname and port where this appservice should listen.
|
|
|
|
hostname: 0.0.0.0
|
|
|
|
port: 8080
|
|
|
|
|
2018-08-13 22:24:44 +02:00
|
|
|
# Database config.
|
|
|
|
database:
|
|
|
|
# The database type. Only "sqlite3" is supported.
|
|
|
|
type: sqlite3
|
|
|
|
# The database URI. Usually file name. https://github.com/mattn/go-sqlite3#connection-string
|
|
|
|
uri: mautrix-whatsapp.db
|
2018-08-13 00:00:23 +02:00
|
|
|
|
2018-08-16 23:11:28 +02:00
|
|
|
# Path to the Matrix room state store.
|
|
|
|
state_store_path: ./mx-state.json
|
|
|
|
|
2018-08-13 00:00:23 +02:00
|
|
|
# The unique ID of this appservice.
|
|
|
|
id: whatsapp
|
|
|
|
# Appservice bot details.
|
|
|
|
bot:
|
|
|
|
# Username of the appservice bot.
|
2018-08-16 23:11:28 +02:00
|
|
|
username: whatsapp
|
2018-08-13 00:00:23 +02:00
|
|
|
# Display name and avatar for bot. Set to "remove" to remove display name/avatar, leave empty
|
|
|
|
# to leave display name/avatar as-is.
|
|
|
|
displayname: WhatsApp bridge bot
|
|
|
|
avatar: mxc://maunium.net/NeXNQarUbrlYBiPCpprYsRqr
|
|
|
|
|
|
|
|
# Authentication tokens for AS <-> HS communication. Autogenerated; do not modify.
|
|
|
|
as_token: "This value is generated when generating the registration"
|
|
|
|
hs_token: "This value is generated when generating the registration"
|
|
|
|
|
|
|
|
# Bridge config. Currently unused.
|
|
|
|
bridge:
|
2018-08-13 22:24:44 +02:00
|
|
|
# Localpart template of MXIDs for WhatsApp users.
|
2018-08-18 21:57:08 +02:00
|
|
|
# {{.Receiver}} is replaced with the WhatsApp user ID of the Matrix user receiving messages.
|
|
|
|
# {{.UserID}} is replaced with the user ID of the WhatsApp user.
|
2018-08-13 00:00:23 +02:00
|
|
|
username_template: "whatsapp_{{.Receiver}}_{{.UserID}}"
|
2018-08-13 22:24:44 +02:00
|
|
|
# Displayname template for WhatsApp users.
|
2018-08-18 21:57:08 +02:00
|
|
|
# {{.Name}} - display name
|
|
|
|
# {{.Short}} - short display name (usually first name)
|
2018-08-26 21:50:28 +02:00
|
|
|
# {{.Notify}} - nickname (maybe set by the target WhatsApp user)
|
|
|
|
# {{.Jid}} - phone number (international format)
|
|
|
|
displayname_template: "{{if .Name}}{{.Name}}{{else if .Notify}}{{.Notify}}{{else if .Short}}{{.Short}}{{else}}{{.Jid}}{{end}}"
|
2018-08-16 23:11:28 +02:00
|
|
|
|
|
|
|
# The prefix for commands. Only required in non-management rooms.
|
|
|
|
command_prefix: "!wa"
|
|
|
|
|
|
|
|
# Permissions for using the bridge.
|
|
|
|
# Permitted values:
|
|
|
|
# user - Access to use the bridge to chat with a WhatsApp account.
|
|
|
|
# admin - User level and some additional administration tools
|
|
|
|
# Permitted keys:
|
|
|
|
# * - All Matrix users
|
|
|
|
# domain - All users on that homeserver
|
|
|
|
# mxid - Specific user
|
|
|
|
permissions:
|
|
|
|
"example.com": full
|
|
|
|
"@admin:example.com": admin
|
2018-08-13 00:00:23 +02:00
|
|
|
|
|
|
|
# Logging config.
|
|
|
|
logging:
|
|
|
|
# The directory for log files. Will be created if not found.
|
|
|
|
directory: ./logs
|
|
|
|
# Available variables: .date for the file date and .index for different log files on the same day.
|
2018-08-16 14:59:18 +02:00
|
|
|
file_name_format: "{{.date}}-{{.index}.log"
|
2018-08-13 00:00:23 +02:00
|
|
|
# Date format for file names in the Go time format: https://golang.org/pkg/time/#pkg-constants
|
|
|
|
file_date_format: 2006-01-02
|
|
|
|
# Log file permissions.
|
|
|
|
file_mode: 0600
|
|
|
|
# Timestamp format for log entries in the Go time format.
|
|
|
|
timestamp_format: Jan _2, 2006 15:04:05
|
|
|
|
# Minimum severity for log messages.
|
|
|
|
# Options: debug, info, warn, error, fatal
|
2018-08-16 18:20:07 +02:00
|
|
|
print_level: debug
|