example-config.yaml 3.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. # Homeserver details.
  2. homeserver:
  3. # The address that this appservice can use to connect to the homeserver.
  4. address: https://matrix.org
  5. # The domain of the homeserver (for MXIDs, etc).
  6. domain: matrix.org
  7. # Application service host/registration related details.
  8. # Changing these values requires regeneration of the registration.
  9. appservice:
  10. # The address that the homeserver can use to connect to this appservice.
  11. address: http://localhost:8080
  12. # The hostname and port where this appservice should listen.
  13. hostname: 0.0.0.0
  14. port: 8080
  15. # Database config.
  16. database:
  17. # The database type. Only "sqlite3" is supported.
  18. type: sqlite3
  19. # The database URI. Usually file name. https://github.com/mattn/go-sqlite3#connection-string
  20. uri: mautrix-whatsapp.db
  21. # Path to the Matrix room state store.
  22. state_store_path: ./mx-state.json
  23. # The unique ID of this appservice.
  24. id: whatsapp
  25. # Appservice bot details.
  26. bot:
  27. # Username of the appservice bot.
  28. username: whatsapp
  29. # Display name and avatar for bot. Set to "remove" to remove display name/avatar, leave empty
  30. # to leave display name/avatar as-is.
  31. displayname: WhatsApp bridge bot
  32. avatar: mxc://maunium.net/NeXNQarUbrlYBiPCpprYsRqr
  33. # Authentication tokens for AS <-> HS communication. Autogenerated; do not modify.
  34. as_token: "This value is generated when generating the registration"
  35. hs_token: "This value is generated when generating the registration"
  36. # Bridge config. Currently unused.
  37. bridge:
  38. # Localpart template of MXIDs for WhatsApp users.
  39. # {{.Receiver}} is replaced with the WhatsApp user ID of the Matrix user receiving messages.
  40. # {{.UserID}} is replaced with the user ID of the WhatsApp user.
  41. username_template: "whatsapp_{{.Receiver}}_{{.UserID}}"
  42. # Displayname template for WhatsApp users.
  43. # {{.Name}} - display name
  44. # {{.Short}} - short display name (usually first name)
  45. # {{.Notify}} - nickname (maybe set by the target WhatsApp user)
  46. # {{.Jid}} - phone number (international format)
  47. displayname_template: "{{if .Name}}{{.Name}}{{else if .Notify}}{{.Notify}}{{else if .Short}}{{.Short}}{{else}}{{.Jid}}{{end}}"
  48. # The prefix for commands. Only required in non-management rooms.
  49. command_prefix: "!wa"
  50. # Permissions for using the bridge.
  51. # Permitted values:
  52. # user - Access to use the bridge to chat with a WhatsApp account.
  53. # admin - User level and some additional administration tools
  54. # Permitted keys:
  55. # * - All Matrix users
  56. # domain - All users on that homeserver
  57. # mxid - Specific user
  58. permissions:
  59. "example.com": full
  60. "@admin:example.com": admin
  61. # Logging config.
  62. logging:
  63. # The directory for log files. Will be created if not found.
  64. directory: ./logs
  65. # Available variables: .date for the file date and .index for different log files on the same day.
  66. file_name_format: "{{.date}}-{{.index}.log"
  67. # Date format for file names in the Go time format: https://golang.org/pkg/time/#pkg-constants
  68. file_date_format: 2006-01-02
  69. # Log file permissions.
  70. file_mode: 0600
  71. # Timestamp format for log entries in the Go time format.
  72. timestamp_format: Jan _2, 2006 15:04:05
  73. # Minimum severity for log messages.
  74. # Options: debug, info, warn, error, fatal
  75. print_level: debug