Thumbnail

rani/matterbridge.git

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

Viewing file on branch master

1# Whatsappmulti
2
3- Status: ???
4- Maintainers: ???
5- Features: ???
6
7## Configuration
8
9> [!TIP]
10> For detailed information about whatsapp settings, see [settings.md](settings.md)
11
12**Basic configuration example:**
13
14```toml
15[whatsappmulti.mywhatsapp]
16RemoteNickFormat="[{PROTOCOL}] @{NICK}: "
17# Get a disposable SIM card
18Number="+48111222333"
19# See FAQ
20SessionFile="/usr/share/matterbridge/session-48111222333.gob"
21```
22
23## FAQ
24
25### What is the QR-code about?
26
27The QR-Code is created by matterbridge on the terminal: It's the way WhatsApp authenticates any WA-Web session (which the bridge is using). At startup, matterbridge will prompt a QR-code for about 1 minute that you have to scan from your WA-instance (on your phone or android-VM). To scan it, go to Settings > WhatsApp Web in your WA client (if you run a VM, you may need to connect your webcam, or make a virtual one, see link above):
28
29![](https://user-images.githubusercontent.com/8722846/64077252-ae3be180-ccce-11e9-812e-6e8a1e833346.png)
30
31### How to set the WA-channel in the configuration file of matterbridge?
32
33To setup a gateway between two protocols in matterbridge, you need to specify a channel for WA that should be bridged. The chat/group titles you see in WA won't work (e.g. from the screenshot above, "Test" won't work). Fortunately, matterbridge will complain about improper channel names and suggest the correct ones to you. In my case, it was a string of mainly numbers including the phone number of who created the group chat. Maybe there is a way to get this out of WA?
34(Currently, the WA example config does not explain this at all; it doesn't even mention the gateway part.)
35
36### How to set a nice channel name?
37
38Use `tengo`:
39
40Save below snippet as `myremotenickformat.tengo`
41```
42if channel == "48111222333-1549986983@g.us" {
43 result = "[CfP #Code for Pakistan] @"+nick
44}
45```
46Add `RemoteNickFormat="{TENGO}"` to the specific bridge
47
48and add the following in matterbridge.toml
49
50```
51[tengo]
52RemoteNickFormat="myremotenickformat.tengo"
53```
54
55For context see: https://github.com/42wim/matterbridge/issues/725
56