-
Notifications
You must be signed in to change notification settings - Fork 617
Section WhatsApp (basic)
[whatsapp.mywhatsapp]
# Number you will use as a relay bot. Tip: Get some disposable sim card, don't rely on
# your own number.
Number="+48111222333"
# First time that you login you will need to scan QR code, then credentials will be saved in
# a session file.
# If you won't set SessionFile then you will need to scan QR code on every restart.
# optional (by default the session is stored only in memory, till restarting matterbridge)
SessionFile="session-48111222333.gob"
# If your terminal is white we need to invert QR code in order for it to be scanned properly
# optional (default false)
QrOnWhiteTerminal=false
# Messages will be seen by other WhatsApp contacts as coming from the bridge.
# Original nick will be part of the message.
RemoteNickFormat="[{PROTOCOL}] @{NICK}: "
For a full working example see: https://github.com/Code-for-All/matterbridge-config/blob/master/matterbridge.toml
The 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):
To 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? (Currently, the WA example config does not explain this at all; it doesn't even mention the gateway part.)
Use tengo
:
Save below snippet as myremotenickformat.tengo
if channel == "[email protected]" {
result = "[CfP #Code for Pakistan] @"+nick
}
Add RemoteNickFormat="{TENGO}"
to the specific bridge
and add the following in matterbridge.toml
[tengo]
RemoteNickFormat="myremotenickformat.tengo"
For context see: https://github.com/42wim/matterbridge/issues/725
You can follow these leads and update the wiki:
- https://github.com/tulir/mautrix-whatsapp/wiki/Android-VM-Setup
- KaiOs
- https://blog.whatsapp.com/10000649/WhatsApp-for-JioPhone-on-KaiOS?l=en
- KaiOS is a fork of FirefoxOS, thus basically a glorified browser and this app is most likely a HTML5 / Javascript application. Edit: https://ftp.mozilla.org/pub/labs/fxos-simulator/ https://developer.mozilla.org/en-US/docs/Archive/B2G_OS/Simulator (Which is a plugin for Firefox)
- @JoKeyser
- @poVoq
- @42wim
Getting started
How to create your config
Discord bot setup
Slack bot setup
MS Teams setup
Deploy
DigitalOcean
Azure
Docker
Heroku
Gateways
Config: basic
Config: channel rules
Discord
Gitter
Hipchat
IRC
Keybase
Matrix
Mattermost
Microsoft Teams
Mumble
Nextcloud Talk
RocketChat
Slack
Sshchat
Steam
Telegram
Twitch
VK
WhatsApp
XMPP
Zulip
Advanced
Mediaserver setup
Service files
Developer
API
Tengo scripting
Making gateways