example-config.yaml 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  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 (set by the target WhatsApp user)
  46. displayname_template: "{{if .Name}}{{.Name}}{{else if .Notify}}{{.Notify}}{{else if .Short}}{{.Short}}{{else}}Unnamed user{{end}}"
  47. # The prefix for commands. Only required in non-management rooms.
  48. command_prefix: "!wa"
  49. # Permissions for using the bridge.
  50. # Permitted values:
  51. # user - Access to use the bridge to chat with a WhatsApp account.
  52. # admin - User level and some additional administration tools
  53. # Permitted keys:
  54. # * - All Matrix users
  55. # domain - All users on that homeserver
  56. # mxid - Specific user
  57. permissions:
  58. "example.com": full
  59. "@admin:example.com": admin
  60. # Logging config.
  61. logging:
  62. # The directory for log files. Will be created if not found.
  63. directory: ./logs
  64. # Available variables: .date for the file date and .index for different log files on the same day.
  65. file_name_format: "{{.date}}-{{.index}.log"
  66. # Date format for file names in the Go time format: https://golang.org/pkg/time/#pkg-constants
  67. file_date_format: 2006-01-02
  68. # Log file permissions.
  69. file_mode: 0600
  70. # Timestamp format for log entries in the Go time format.
  71. timestamp_format: Jan _2, 2006 15:04:05
  72. # Minimum severity for log messages.
  73. # Options: debug, info, warn, error, fatal
  74. print_level: debug