-
Notifications
You must be signed in to change notification settings - Fork 3
/
example-config.yaml
115 lines (109 loc) · 3.84 KB
/
example-config.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
# ===== Matrix Authentication =====
# The Matrix homeserver to connect to
homeserver: https://matrix.example.com
# The Matrix username of the help bot
username: "@help:example.com"
# A file containing the Matrix user password
password_file: /path/to/password/file
# ===== Chatwoot Authentication =====
# The base URL for the Chatwoot instance
chatwoot_base_url: https://app.chatwoot.com/
# A file containing the access token for Chatwoot
chatwoot_access_token_file: /path/to/chatwoot/access/file
# The Chatwoot account ID to use
chatwoot_account_id: 123
# The Chatwoot inbox ID to create conversations in
chatwoot_inbox_id: 123
# ===== Database Settings =====
database:
# The database type. Only "pgx" is supported.
type: pgx
# The database URI.
# Postgres: Connection string. For example, postgres://user:password@host/database?sslmode=disable
# To connect via Unix socket, use something like postgres:///dbname?host=/var/run/postgresql
uri: postgresql://user:password@somewhere/chatwoot
# Maximum number of connections. Mostly relevant for Postgres.
max_open_conns: 20
max_idle_conns: 2
# Maximum connection idle time and lifetime before they're closed. Disabled if null.
# Parsed with https://pkg.go.dev/time#ParseDuration
max_conn_idle_time: null
max_conn_lifetime: null
# ===== Bot Settings =====
# Whitelist for which homeservers should be allowed to create conversations.
homeserver_whitelist:
# Whether to enable the whitelist.
enable: false
# A list of allowed homeservers.
allowed:
- example.com
# Configure whether and how to start new chats from Chatwoot.
start_new_chat:
# Whether to enable starting new chats from Chatwoot.
enable: false
# Endpoint that will create the Matrix conversation. Auth should be with the
# Matrix access token.
#
# The endpoint must be a POST endpoint that accepts a JSON object with the
# following content (both fields optional, and potentially other fields
# included, but should not be depended on):
#
# {
# "phone_number":"+11234567890",
# "email":"[email protected]"
# }
#
# and should return 200 with a JSON object with the following content (and
# optionally other fields):
#
# {
# "room_id": "!abcd:beeper.local"
# }
#
# or a non-200 status code with an error (and optionally other fields):
#
# {
# "error": "+11234567890 is not on iMessage"
# }
#
# the behavior of the endpoint is undefined if the request payload is
# malformed.
endpoint:
# The Authentication token to use on the request.
token:
# If not "", when creating a conversation, if the Matrix room name starts
# with this prefix, it will be labeled with the "canonical-dm" label. Defaults
# to "".
canonical_dm_prefix:
# If not -1, only bridge conversations where the member count in the room is
# less than this. Defaults to -1.
bridge_if_members_less_than: -1
# Boolean indicating whether or not to convert the Chatwoot markdown to Matrix
# HTML.
render_markdown: false
# ===== Backfill Settings =====
# These backfills happen asynchronously on bot startup.
backfill:
# Automatically create Chatwoot conversations for Matrix DM rooms that don't
# yet have a Chatwoot conversation.
chatwoot_conversations: true
# Send com.beeper.chatwoot.conversation_id state events to all rooms that
# have a corresponding Chatwoot conversation.
# This is O(n) in the number of Chatwoot conversations.
conversation_id_state_events: false
# ===== Webhook Listener Settings =====
# The port to listen for webhook events on. Defaults to 8080
listen_port: 8080
# ===== Logger Settings =====
# See https://github.com/tulir/zeroconfig for details.
logging:
min_level: debug
writers:
- type: stdout
format: pretty-colored
- type: file
format: json
filename: ./logs/chatwoot-bot.log
max_size: 100
max_backups: 10
compress: true