Thumbnail

rani/matterbridge.git

Clone URL: https://git.buni.party/rani/matterbridge.git

Viewing file on branch master

1# Settings
2
3On this page you will find information about global matterbridge settings. Most of these settings can be applied to specific gateways, and those marked **GENERAL** can be placed in the `[general]` configuration dictionary for setting it across all gateways.
4
5> [!TIP]
6> Settings specific to a certain protocol can be found in the corresponding folder in the
7> [protocols/](protocols/) documentation folder. API settings for can be found in the
8> [api/](api/) documentation folder.
9
10# Info
11
12* **OPTIONAL:** this setting isn't enabled by default.
13* **RELOADABLE:** this setting can be reloaded by editing the configuration. No restart of matterbridge is required.
14* **ALL:** this setting is usable with all bridges.
15* **GENERAL:** this setting can be also set under `[general]` which means it's active for all bridges.
16
17# Shared
18Only settings which have the `ALL` setting are usable for all bridges.
19
20## EditDisable
21Disable sending of edits to other bridges
22
23Setting: OPTIONAL, RELOADABLE \
24Format: boolean \
25Example: enable it
26
27`EditDisable=true`
28
29## EditSuffix
30Message to be appended to every edited message
31
32Setting: OPTIONAL, RELOADABLE \
33Format: string \
34Example:
35
36`EditSuffix=" (edited)"`
37
38## IgnoreMessages
39Messages you want to ignore.\
40Messages matching these regexp will be ignored and not sent to other bridges.\
41See https://regex-golang.appspot.com/assets/html/index.html for more regex info.
42
43Setting: OPTIONAL, RELOADABLE, ALL \
44Format: space seperated regex string \
45Example: ignores messages starting with ~~ or messages containing badword
46
47`IgnoreMessages="^~~ badword"`
48
49## IgnoreNicks
50Nicks you want to ignore.\
51Messages from those users will not be sent to other bridges.
52
53Setting: OPTIONAL, RELOADABLE, ALL \
54Format: space seperated regex string \
55Example: ignore messages from ircspammer1 and ircspammer2
56
57`IgnoreNicks="ircspammer1 ircspammer2"`
58
59## Label
60Extra label that can be used in the `RemoteNickFormat`
61
62Setting: OPTIONAL, RELOADABLE, ALL \
63Format: string \
64Example: add the label `mychat`
65
66`Label="mychat"`
67
68## PrefixMessagesWithNick
69Whether to prefix messages from other bridges to with the sender's nick.
70Useful if username overrides for incoming webhooks isn't enabled.
71 If you set PrefixMessagesWithNick to true, each message
72from other bridges will by default be prefixed by "bridge-" + nick. You can,
73however, modify how the messages appear, by setting (and modifying) `RemoteNickFormat`
74
75Setting: OPTIONAL, RELOADABLE \
76Format: boolean \
77Example:
78
79`PrefixMessagesWithNick=true`
80
81
82## RemoteNickFormat
83Defines how remote users appear on this bridge. \
84The string "{NICK}" (case sensitive) will be replaced by the actual nick / username. \
85The string "{BRIDGE}" (case sensitive) will be replaced by the sending bridge. \
86The string "{LABEL}" (case sensitive) will be replaced by label= field of the sending bridge. \
87The string "{PROTOCOL}" (case sensitive) will be replaced by the protocol used by the bridge. \
88The string "{GATEWAY}" (case sensitive) will be replaced by the origin gateway name that is replicating the message. \
89The string "{CHANNEL}" (case sensitive) will be replaced by the origin channel name used by the bridge. \
90The string "{TENGO}" (case sensitive) will be replaced by the output of the RemoteNickFormat script under `[tengo]` \
91The string "{NOPINGNICK}" (case sensitive) will be replaced by the actual nick / username, but with a ZWSP inside the nick, so the irc user with the same nick won't get pinged. See https://github.com/42wim/matterbridge/issues/175 for more information
92
93Setting: OPTIONAL, RELOADABLE, GENERAL, ALL \
94Format: string \
95Example: add PROTOCOL and NICK
96
97`RemoteNickFormat="[{PROTOCOL}] <{NICK}> "`
98
99## ReplaceMessages
100Messages you want to replace. \
101It replaces outgoing messages from the bridge. \
102So you need to place it by the sending bridge definition.\
103Regular expressions supported.
104
105Setting: OPTIONAL, RELOADABLE, ALL \
106Format: [ ["from1","to1"],["from2","to2"] ] \
107Example: this replaces cat => dog and sleep => awake
108
109`ReplaceMessages=[ ["cat","dog"], ["sleep","awake"] ]`
110
111## ReplaceNicks
112Nicks you want to replace. \
113See `ReplaceMessages` for syntax
114
115Setting: OPTIONAL, RELOADABLE, ALL \
116Format: [ ["from1","to1"],["from2","to2"] ] \
117Example: this replaces user-- => user
118
119`ReplaceNicks=[ ["user--","user"] ]`
120
121## ShowJoinPart
122Enable to show users joins/parts from other bridges \
123Currently works for messages from the following bridges: irc, mattermost, slack
124
125Setting: OPTIONAL, RELOADABLE, ALL \
126Format: boolean \
127Example: enable it
128
129`ShowJoinPart=true`
130
131## ShowTopicChange
132Enable to show topic changes from other bridges. \
133Only works hiding/show topic changes from slack bridge for now.
134
135Setting: OPTIONAL, RELOADABLE, ALL \
136Format: boolean \
137Example: enable it
138
139`ShowTopicChange=true`
140
141## SkipTLSVerify
142Enable to not verify the certificate on your server.
143e.g. when using selfsigned certificates
144
145Setting: OPTIONAL \
146Format: boolean \
147Example: enable it
148
149`SkipTLSVerify=true`
150
151## StripNick
152StripNick only allows alphanumerical nicks. See https://github.com/42wim/matterbridge/issues/285
153It will strip other characters from the nick
154
155Setting: OPTIONAL, RELOADABLE, GENERAL, ALL \
156Format: boolean \
157Example: enable it
158
159`StripNick=true`
160
161## UseLocalAvatar
162
163UseLocalAvatar specifies source bridges for which an avatar should be 'guessed' when an incoming message has no avatar. This works by comparing the username of the message to an existing Discord user, and using the avatar of the Discord user. (Substitute "Discord" with another platform, if used on another platform.)
164
165On Discord, this only works if `WebhookURL` is set (AND the message has no avatar).
166
167At the moment, this setting is only available for Discord.
168
169Setting: OPTIONAL, RELOADABLE
170Format: `["gateway.account1", "gateway.account2", "gateway"]`
171Example: `["irc"]` - this example will guess the avatar coming from the `irc` platform
172
173# General
174
175Configuration that can be set under `[general]`
176
177## IgnoreFailureOnStart
178Allows you to ignore failing bridges on startup.
179Matterbridge will disable the failed bridge and continue with the other ones. \
180Context: https://github.com/42wim/matterbridge/issues/455
181
182Setting: OPTIONAL, RELOADABLE, GENERAL \
183Format: boolean \
184Example: enable it
185
186`IgnoreFailureOnStart=true`
187
188## LogFile
189
190LogFile defines the location of a file to write logs into, rather than stdout.
191Logging will still happen on stdout if the file cannot be open for #writing, or if the value is empty.
192Note that the log won't roll, so you might want to use logrotate(8) with this feature.
193
194Setting: OPTIONAL, GENERAL \
195Format: string \
196Example:
197
198`LogFile="/var/log/matterbridge.log"`
199
200## MediaDownloadBlacklist
201Allows you to blacklist specific files from being downloaded.
202Filenames matching these regexp will not be download/uploaded to the mediaserver. \
203You can use regex for this, see https://regex-golang.appspot.com/assets/html/index.html for more regex info
204
205Setting: OPTIONAL, RELOADABLE, GENERAL \
206Format: string array \
207Example: do not upload html and htm extension
208
209`MediaDownloadBlacklist=[".html$",".htm$"]`
210
211## MediaDownloadPath
212MediaDownloadPath is the filesystem path where the media file will be placed, instead of uploaded, for if Matterbridge has write access to the directory your webserver is serving. [More information](https://github.com/matterbridge-org/matterbridge/blob/master/docs/advanced/mediaserver.md)
213
214Setting: OPTIONAL, RELOADABLE, GENERAL \
215Format: string \
216Example:
217
218`MediaDownloadPath="/srv/http/yourserver.com/public/download"`
219
220## MediaDownloadSize
221Maximum size in bytes matterbridge will download for use with upload to the
222media server or to other bridges.
223
224Setting: OPTIONAL, RELOADABLE, GENERAL \
225Format: int \
226Default: 10000000 (1 megabyte) \
227Example:
228
229`MediaDownloadSize=1000000`
230
231
232## MediaServerDownload
233The MediaServerDownload will be used so that bridges without native uploading support:
234irc and xmpp will be shown links to the files on MediaServerDownload
235More information https://github.com/42wim/matterbridge/wiki/Mediaserver-setup-%28advanced%29
236
237Setting: OPTIONAL, RELOADABLE, GENERAL \
238Format: string \
239Example:
240
241`MediaServerDownload="https://youserver.com/download"`
242