mirror of
https://github.com/YunoHost-Apps/mautrix_whatsapp_ynh.git
synced 2024-09-03 19:46:01 +02:00
Create new docs and fix linter issues
This commit is contained in:
parent
54a2be317a
commit
7109858320
14 changed files with 181 additions and 218 deletions
18
doc/ADMIN.md
Normal file
18
doc/ADMIN.md
Normal file
|
@ -0,0 +1,18 @@
|
|||
## Configuration of the bridge
|
||||
|
||||
The bridge is [roughly configured at installation](https://github.com/YunoHost-Apps/mautrix_whatsapp_ynh/blob/master/conf/config.yaml), e.g. allowed admin and user of the bot.
|
||||
Finer configuration can be done by using the existing config panel in the Yunohost admin panel or by modifying the
|
||||
following configuration file with SSH:
|
||||
```/opt/yunohost/mautrix_whatsapp/config.yaml```
|
||||
and then restarting the mautrix_whatsapp service.
|
||||
|
||||
#### User permissions
|
||||
|
||||
|
||||
#### End-to-bridge encryption
|
||||
The bridge can optionally encrypt messages between Matrix users and the bridge to hide messages from the homeserver. Using Postgres is strongly recommended when using end-to-bridge encryption.
|
||||
|
||||
If you want to enable it, go to the config panel section `Privacy -> Portal Rooms & Encryption Settings`. If you enable `Allow Encryption between Matrix Client and Bridge Server?`, the bridge won't enable encryption on its own, but will work in encrypted rooms.
|
||||
Alternatively two more options will appear, `Force-enable Encryption in all Portal Rooms the Bridge creates?` which will automatically enable encryption in new portals and `Require encryption?` which will enforce encryption on any of the messages that you send (this will make the bridge drop any future unencrypted messages).
|
||||
|
||||
There is also the possibity to configure it in the bridge configuration YAML file in the section `bridge: encryption`.
|
17
doc/ADMIN_fr.md
Normal file
17
doc/ADMIN_fr.md
Normal file
|
@ -0,0 +1,17 @@
|
|||
### Configuration de la passerelle
|
||||
|
||||
La passerelle est [configurée avec les paramètres standards adaptés pour votre YunoHost et l'instance Matrix-Synapse sélectionnée](https://github.com/YunoHost-Apps/mautrix_whatsapp_ynh/blob/master/conf/config.yaml).
|
||||
Une configuration plus fine peut être effectuée en utilisant le panneau de configuration existant dans le panneau d'administration de Yunohost ou en modifiant le fichier de configuration suivant avec SSH:
|
||||
``` /opt/yunohost/mautrix_whatsapp/config.yaml```
|
||||
puis en redémarrant le service mautrix_whatsapp.
|
||||
|
||||
#### User permissions
|
||||
|
||||
|
||||
#### End-to-bridge encryption
|
||||
Le robot peut éventuellement chiffrer les messages entre les utilisateurs de Matrix et la passarelle pour cacher les messages du serveur domestique. L'utilisation de Postgres est fortement recommandée lors de l'utilisation du chiffrement end-to-bridge.
|
||||
|
||||
Si vous voulez l'activer, allez dans la section `Privacy -> Portal Rooms & Encryption Settings` du panneau de configuration. Si vous activez `Allow Encryption between Matrix Client and Bridge Server?`, la passarelle n'activera pas le cryptage d'elle-même, mais fonctionnera dans les salles cryptées.
|
||||
Sinon, deux autres options apparaissent, `Force-enable Encryption in all Portal Rooms the Bridge creates?` qui activera automatiquement le cryptage dans les nouveaux portails et `Require encryption?` qui imposera le cryptage sur tous les messages que vous envoyez (ce qui fera que le robot abandonnera tous les messages non cryptés à l'avenir).
|
||||
|
||||
Il est également possible de le configurer dans le fichier YAML de configuration du robot dans la section `bridge: encryption`.
|
9
doc/DEVELOPMENT.md
Normal file
9
doc/DEVELOPMENT.md
Normal file
|
@ -0,0 +1,9 @@
|
|||
## Development code quality
|
||||
|
||||
The `.github/workflows/updater.sh` script needs to be synced with changes in `conf/config.yaml` therefore a `pre-commit`
|
||||
hook is used to display a reminder to update `.github/workflows/updater.sh` (if needed) when `conf/config.yaml` has been modified.
|
||||
|
||||
Please enable Git hooks using following command to ensure code quality and stability.
|
||||
``` bash
|
||||
git config --local core.hooksPath .githooks
|
||||
```
|
10
doc/DEVELOPMENT_fr.md
Normal file
10
doc/DEVELOPMENT_fr.md
Normal file
|
@ -0,0 +1,10 @@
|
|||
## Development code quality
|
||||
|
||||
Le script `.github/workflows/updater.sh` doit être synchronisé avec les changements dans `conf/config.yaml`,
|
||||
donc un hook `pre-commit` est utilisé pour afficher un rappel pour mettre à jour
|
||||
`.github/workflows/updater.sh` (si nécessaire) lorsque `conf/config.yaml` a été modifié.
|
||||
|
||||
Veuillez activer les hooks Git en utilisant la commande suivante pour assurer la qualité et la stabilité du code.
|
||||
``` bash
|
||||
git config --local core.hooksPath .githooks
|
||||
```
|
|
@ -1,103 +0,0 @@
|
|||
## List of known public services
|
||||
|
||||
* Ask on one of the following rooms: #mautrix_yunohost:matrix.fdn.fr or #whatsapp:maunium.net
|
||||
|
||||
## Bridging usage
|
||||
** Note that several WhatsApp and Matrix users can be bridged, each WhatsApp account has its own bot administration room. If they are in a same WhatsApp group, only one matrix room will be created. **
|
||||
|
||||
### Bridge a WhatsApp user and a Matrix user
|
||||
* First your matrix user or server has to be authorized in the bridge configuration (see below)
|
||||
* Then, invite the bot (default @whatsappbot:yoursynapse.domain)
|
||||
* The room with the Mautrix-WhatsApp bot is called "administration room".
|
||||
* Type ``login``
|
||||
* Capture the QR code with the camera in the whatsapp of your VM or smartphone (WhatsApp Web)
|
||||
* Send ``help`` to the bot in the created room to know how to control the bot.
|
||||
See also [upstream wiki Authentication page](https://docs.mau.fi/bridges/go/whatsapp/authentication.html)
|
||||
|
||||
### Bridge an existing room | Bridge Whatsapp to Signal over Matrix
|
||||
By default, the bridge creates a portal room for each WA group that the WA user actively uses.
|
||||
Your can also create a portal for an existing Matrix room. **Note that this can be a room created by another bridge, e.g. a Signal portal room**
|
||||
1. Invite the bridge bot to the room (with an authorized user)
|
||||
2. type `!wa create`
|
||||
3. Your logged in WA user creates a new corresponding group.
|
||||
4. Get the WA invite link `!wa invite-link` and share it with friends. Or invite Whatsapp puppets to room.
|
||||
5. Optional: Activate relaybot, see next section.
|
||||
|
||||
### Relaybot: Bridge a group for several Matrix and several WhatsApp users to chat together
|
||||
**When upgrading from <v0.2.0, the relaybot system changed. There is no relaybot administration room anymore. Relay must be re-activated in all rooms**.
|
||||
|
||||
To be able to bridge not only your logged in Matrix account but also Matrix friends you invite to a portal room, you need to:
|
||||
1. enable relaybot setting in the bridge configuration `relay: enabled: true`
|
||||
2. login to your WhatsApp account in the (main) administration room
|
||||
3. write `!wa set-relay` in each of the rooms you want to relay to (re-)activate the relaybot function. By default, only bridge admin can do this, see setting `admin_only: true`
|
||||
|
||||
* In WhatsApp: all messages will be seen as received from the account who is logged in with a prefix for the source matrix user.
|
||||
* On the matrix side: the bridge will create matrix puppets corresponding to the WhatsApp users when they send a message.
|
||||
See also [upstream wiki Relaybot page](https://docs.mau.fi/bridges/general/relay-mode.html)
|
||||
|
||||
## Configuration of the bridge
|
||||
|
||||
The bridge is [roughly configured at installation](https://github.com/YunoHost-Apps/mautrix_whatsapp_ynh/blob/master/conf/config.yaml), e.g. allowed admin and user of the bot. Finer configuration can be done by modifying the
|
||||
following configuration file with SSH:
|
||||
```/opt/yunohost/mautrix_whatsapp/config.yaml```
|
||||
and then restarting the mautrix_whatsapp service.
|
||||
|
||||
#### End-to-bridge encryption
|
||||
The bridge can optionally encrypt messages between Matrix users and the bridge to hide messages from the homeserver. Using Postgres is strongly recommended when using end-to-bridge encryption.
|
||||
|
||||
If you want to enable it, look for the option ```bridge → encryption``` in the config file. If you only set ```allow: true```, the bridge won't enable encryption on its own, but will work in encrypted rooms. If you set ```default: true```, the bridge will automatically enable encryption in new portals.
|
||||
There is also the possibility to set ```require: true``` to enforce encryption on any of the messages that you send (this will drop any unencrypted messages).
|
||||
|
||||
## YunoHost specific features
|
||||
|
||||
#### Multi-user support
|
||||
|
||||
* Bot users are not related to Yunohost users. Any Matrix account or Synapse server autorized in the configuration of the bridge can invite/use the bot.
|
||||
* The WhatsApp bot is a local Matrix-Synapse user, but accessible through federation (synapse public or private).
|
||||
* Several Signal and Matrix users can be bridged with one bridge, each user has its own bot administration room.
|
||||
* If several bot users are in a same WhatsApp group, only one Matrix room will be created by the bridge.
|
||||
* See https://github.com/YunoHost-Apps/synapse_ynh#multi-users-support
|
||||
|
||||
#### Multi-instance support
|
||||
|
||||
* Multi-instance installation should work. Several bridge instances could be installed for one Matrix-Synapse instance so that one Matrix user can bridge several WhatsApp accounts.
|
||||
* Several bridge instances could be installed for each Matrix-Synapse instance to benefit from it. But one bridge can be used by users from several Matrix-Synapse instances.
|
||||
|
||||
### Supported architectures
|
||||
|
||||
ARM, ARM64, AMD64
|
||||
|
||||
## Limitations
|
||||
|
||||
* Audio/Video calls are not bridged yet.
|
||||
* If WhatsApp loses connection, e.g. the phone is set in flight mode or push notifications are deactivated, the bot has sometimes to be restarted manually by sending a reconnnect message in the matrix administration room.
|
||||
|
||||
### Additional information
|
||||
|
||||
* It is recommended to install WhatsApp on a virtual android running on a server, see [upstream wiki Android-VM-Setup page](https://docs.mau.fi/bridges/go/whatsapp/android-vm-setup.html)
|
||||
**More information on the documentation page:**
|
||||
https://docs.mau.fi/bridges/go/whatsapp/index.html
|
||||
|
||||
To test communication between the App Service and Matrix-Synapse on a VM (e.g. with domain name: synapse.vm), you must install a certificate:
|
||||
```
|
||||
echo | openssl s_client -showcerts -servername synapse.vm -connect synapse.vm:443 2>/dev/null | awk '/-----BEGIN CERTIFICATE-----/, /-----END CERTIFICATE-----/' >> /usr/local/share/ca-certificates/synapse.vm.crt
|
||||
update-ca-certificates
|
||||
```
|
||||
|
||||
### Miscellaneous information
|
||||
|
||||
* Matrix room (matrix bridges in YunoHost): #mautrix_yunohost:matrix.fdn.fr
|
||||
* Matrix room (upstream app): #whatsapp:maunium.net
|
||||
In case you need to upload your logs somewhere, be aware that they contain your contacts' and your phone numbers. Strip them out with
|
||||
``| sed -r 's/[0-9]{10,}/📞/g' ``
|
||||
* "Mautrix-WhatsApp" bridge is based on the [Rhymen/go-whatsapp](https://github.com/Rhymen/go-whatsapp) implementation of the [sigalor/whatsapp-web-reveng](https://github.com/sigalor/whatsapp-web-reveng) project.
|
||||
|
||||
## Development code quality
|
||||
|
||||
The `.github/workflows/updater.sh` script needs to be synced with changes in `conf/config.yaml` therefore a `pre-commit`
|
||||
hook is used to display a reminder to update `.github/workflows/updater.sh` (if needed) when `conf/config.yaml` has been modified.
|
||||
|
||||
Please enable Git hooks using following command to ensure code quality and stability.
|
||||
``` bash
|
||||
git config --local core.hooksPath .githooks
|
||||
```
|
|
@ -1,87 +0,0 @@
|
|||
## Liste de passerelles publiques
|
||||
|
||||
* Demandez sur un des salons suivants: #mautrix_yunohost:matrix.fdn.fr or #whatsapp:maunium.net
|
||||
|
||||
## Usages de la passerelle
|
||||
** Notez que plusieurs comptes WhatsApp et Matrix peuvent être relayés, chaque compte WhatsApp connecté a son propre Salon d'Administration. Si plusieurs utilisateur.ice.s du Robot sont dans un même groupe WhatsApp, seul un Salon Matrix sera créé par la passerelle. **
|
||||
|
||||
### Relayer TOUTES les conversations entre UN compte WhatsApp et UN compte Matrix
|
||||
* Prérequis : votre compte Matrix ou le serveur sur lequel il est hébergé doit être autorisé dans la configuration de la passerelle (voir ci-dessous)
|
||||
* Invitez le Robot (par défaut @whatsappbot:synapse.votredomaine) à une nouvelle conversation.
|
||||
* Ce nouveau salon d'administration du Robot Mautrix-WhatsApp est appelé "Administration Room".
|
||||
* Tapez ``login``
|
||||
* Scannez le QR-code avec la caméra Whatsapp de votre Machine Virtuelle ou ordiphone (option WhatsApp Web dans l'appli)
|
||||
* Envoyez ``help`` au Robot dans le "Administration Room" pour une liste des commandes d'administration de la passerelle.
|
||||
Voir aussi [upstream wiki Authentication page](https://docs.mau.fi/bridges/go/whatsapp/authentication.html)
|
||||
|
||||
#### Robot-Relai "Relaybot": Relayer les conversations de TOUS les comptes Matrix et TOUS les comptes WhatsApp présents dans UN groupe/salon
|
||||
|
||||
* Prérequis : Créer un nouveau salon vide "Relaybot Administration Room" et rechercher son identifiant.
|
||||
* Activer l'option Robot-Relai "Relaybot" dans la configuration de la passerelle (default=disabled, voir ci-dessous) et ajouter l'identifiant du salon d'administration du Relaybot "Relaybot Administration Room".
|
||||
* Redémarrer le service mautrix_whatsapp
|
||||
* Vous pouvez maintenant relayer un groupe WhatsApp en y invitant le numéro de téléphone du compte WhatsApp connecté au RobotRelai. Côté WhatsApp, tous les messages venant de Matrix seront vus comme envoyés depuis le compte WhatsApp connecté, avec un préfix indiquant le compte Matrix correspondant. Côté Matrix, la passerelle va créer des comptes Matrix pour chaque compte WhatsApp présent dans le groupe relayé. Les messages sont indiqués comme provenant soit du numéro de téléphone, soit du pseudo WhatsApp.
|
||||
Voir aussi [la page wiki principale sur le Robot-Relai](https://docs.mau.fi/bridges/go/whatsapp/relaybot.html)
|
||||
|
||||
### Configuration de la passerelle
|
||||
|
||||
La passerelle est [configurée avec les paramètres standards adaptés pour votre YunoHost et l'instance Matrix-Synapse sélectionnée](https://github.com/YunoHost-Apps/mautrix_whatsapp_ynh/blob/master/conf/config.yaml). Vous pouvez par exemple ajouter des administrateur.ice.s et utilisateur.ice.s du Robot autorisés en modifiant le fichier de configuration par liaison SSH:
|
||||
``` sudo nano /opt/yunohost/mautrix_whatsapp/config.yaml```
|
||||
puis en redémarrant le service:
|
||||
``` sudo yunohost service restart mautrix_whatsapp```
|
||||
|
||||
#### End-to-bridge encryption
|
||||
Le robot peut éventuellement chiffrer les messages entre les utilisateurs de Matrix et la passarelle pour cacher les messages du serveur domestique. L'utilisation de Postgres est fortement recommandée lors de l'utilisation du chiffrement end-to-bridge.
|
||||
|
||||
Si vous voulez l'activer, cherchez l'option ```bridge → encryption``` dans le fichier de configuration. Si vous définissez uniquement l'option ``allow: true``, le robot n'activera pas le chiffrement de lui-même, mais travaillera dans les portails chiffrés. Si vous définissez ```default: true```, la passerelle activera automatiquement le chiffrement dans les nouveaux portails.
|
||||
Il y a également la possibilité de définir ```require: true``` pour imposer le chiffrement sur tous les messages que vous envoyez (cela interdira tous les messages non chiffrés).
|
||||
|
||||
### Support multi-comptes
|
||||
|
||||
* Les utilisateur.ice.s du Robot ne sont pas liés aux comptes Yunohost. N'importe quel compte Matrix ou serveur Synapse autorisés dans la configuration de la passerelle peut inviter/utiliser le Robot.
|
||||
* Le robot WhatsApp est un utilisateur Matrix-Synapse local, mais accessible via la fédération (Synapse public ou privé).
|
||||
* Plusieurs comptes WhatsApp et Matrix peuvent être liés avec une seule passerelle, chaque compte a son propre salon d'administration.
|
||||
* Si plusieurs utilisateur.ice.s du Robot sont dans un même groupe WhatsApp, seul un Salon Matrix sera créé par la passerelle. Autrement dit, la passerelle construit un seul miroir du réseau de discussion existant sur WhatsApp (utilisateurs et salons).
|
||||
* Voir https://github.com/YunoHost-Apps/synapse_ynh#multi-users-support
|
||||
|
||||
### Support multi-instance
|
||||
|
||||
* L'installation multi-instance devrait fonctionner. Plusieurs instances de passerelles pourraient être installées pour une instance de Matrix-Synapse. Cela permet à un compte matrix de se relier à plusieurs comptes WhatsApp.
|
||||
* Plusieurs instances de passerelles pourraient être installées pour que chaque instance de Matrix-Synapse puisse en bénéficier. Mais une passerelle peut être utilisée par les comptes de plusieurs instances Matrix-Synapse.
|
||||
|
||||
### Architectures supportées
|
||||
|
||||
ARM, ARM64, AMD64
|
||||
|
||||
### Limitations
|
||||
|
||||
* Les appels Audio/Video ne sont pas relayés. Seule une notification apparait.
|
||||
* Si WhatsApp perd la connexion, par ex. l'ordiphone est mis en mode avion ou les notifications poussées sont désactivées, le robot doit parfois être redémarré à la main en envoyant un message ``wa !reconnnect`` dans le salon d'administration.
|
||||
|
||||
### Informations additionnelles
|
||||
|
||||
* Il est recommandé d'installer WhatsApp sur une machine Android virtuelle tournant sur un serveur, cf. le [page Android-VM-Setup du wiki](https://docs.mau.fi/bridges/go/whatsapp/android-vm-setup.html)
|
||||
|
||||
Pour tester la communication entre le Service d'Application et Matrix-Synapse sur une Machine Virtuelle (ex. avec un nom de domaine: synapse.vm), vous devez installer un certificat:
|
||||
```
|
||||
echo | openssl s_client -showcerts -servername synapse.vm -connect synapse.vm:443 2>/dev/null | awk '/-----BEGIN CERTIFICATE-----/, /-----END CERTIFICATE-----/' >> /usr/local/share/ca-certificates/synapse.vm.crt
|
||||
update-ca-certificates
|
||||
```
|
||||
|
||||
### Informations diverses
|
||||
|
||||
* Salon Matrix sur les Passerelles dans Yunohost): #mautrix_yunohost:matrix.fdn.fr
|
||||
* Salon Matrix (application principale): #whatsapp:maunium.net
|
||||
Si vous devez téléverser vos fichiers log quelque-part, soyez avertis qu'ils contiennent des informations sur vos contacts et vos numéros de téléphone. Effacez-les avec
|
||||
``| sed -r 's/[0-9]{10,}/📞/g' ``
|
||||
* La passerelle "Mautrix-WhatsApp" repose sur l'implémentation [Rhymen/go-whatsapp](https://github.com/Rhymen/go-whatsapp) du projet [sigalor/whatsapp-web-reveng](https://github.com/sigalor/whatsapp-web-reveng).
|
||||
|
||||
## Development code quality
|
||||
|
||||
Le script `.github/workflows/updater.sh` doit être synchronisé avec les changements dans `conf/config.yaml`,
|
||||
donc un hook `pre-commit` est utilisé pour afficher un rappel pour mettre à jour
|
||||
`.github/workflows/updater.sh` (si nécessaire) lorsque `conf/config.yaml` a été modifié.
|
||||
|
||||
Veuillez activer les hooks Git en utilisant la commande suivante pour assurer la qualité et la stabilité du code.
|
||||
``` bash
|
||||
git config --local core.hooksPath .githooks
|
||||
```
|
37
doc/POST_INSTALL.md
Normal file
37
doc/POST_INSTALL.md
Normal file
|
@ -0,0 +1,37 @@
|
|||
## List of known public services
|
||||
|
||||
* Ask on one of the following rooms: #mautrix_yunohost:matrix.fdn.fr or #whatsapp:maunium.net
|
||||
|
||||
## Bridging usage
|
||||
** Note that several WhatsApp and Matrix users can be bridged, each WhatsApp account has its own bot administration room. If they are in a same WhatsApp group, only one matrix room will be created. **
|
||||
|
||||
### Bridge a WhatsApp user and a Matrix user
|
||||
* First your matrix user or server has to be authorized in the bridge configuration (see below)
|
||||
* Then, invite the bot (default @whatsappbot:yoursynapse.domain)
|
||||
* The room with the Mautrix-WhatsApp bot is called "administration room".
|
||||
* Type ``login``
|
||||
* Capture the QR code with the camera in the WhatsApp of your VM or smartphone (WhatsApp Web)
|
||||
* Send ``help`` to the bot in the created room to know how to control the bot.
|
||||
See also [upstream wiki Authentication page](https://docs.mau.fi/bridges/go/whatsapp/authentication.html)
|
||||
|
||||
### Bridge an existing room
|
||||
By default, the bridge creates a portal room for each WhatsApp group that the WhatsApp user actively uses.
|
||||
Your can also create a portal for an existing Matrix room. **Note that this can be a room created by another bridge, e.g. a Signal portal room**
|
||||
1. Invite the bridge bot to the room (with an authorized user)
|
||||
2. Type `!wa create`
|
||||
3. Your logged in WA user creates a new corresponding group.
|
||||
4. Get the WA invite link `!wa invite-link` and share it with friends. Or invite WhatsApp puppets to room.
|
||||
5. Optional: Activate relaybot, see next section.
|
||||
|
||||
### Relaybot: Bridge a group for several Matrix and several WhatsApp users to chat together
|
||||
|
||||
To be able to bridge not only your logged in Matrix account but also Matrix friends you invite to a portal room, you need to:
|
||||
1. Enable relaybot setting in the config panel section `Main Settings -> Puppetting Bridge Settings` or in the bridge configuration YAML file `relay: enabled: true`. Also make sure that the users you want to invite have at least the `relay` level in the `permissions` section (this can be configured in the config panel section `Main Settings -> Permissions for using the bridge`).
|
||||
2. Login to your WhatsApp account in the (main) administration room
|
||||
3. Depending on what has been selected during installation this could be done only by admins, but can also be changed in the config panel section `Main Settings -> Puppetting Bridge Settings` or in the bridge configuration YAML file `relay: admin_only`.
|
||||
4. Write `!wa set-relay` in each of the rooms you want to relay to (re-)activate the relaybot function.
|
||||
|
||||
|
||||
* In WhatsApp: all messages will be seen as received from the account who is logged in with a prefix for the source matrix user.
|
||||
* On the matrix side: the bridge will create matrix puppets corresponding to the WhatsApp users when they send a message.
|
||||
See also [upstream wiki Relaybot page](https://docs.mau.fi/bridges/general/relay-mode.html)
|
24
doc/POST_INSTALL_fr.md
Normal file
24
doc/POST_INSTALL_fr.md
Normal file
|
@ -0,0 +1,24 @@
|
|||
## Liste de passerelles publiques
|
||||
|
||||
* Demandez sur un des salons suivants: #mautrix_yunohost:matrix.fdn.fr or #whatsapp:maunium.net
|
||||
|
||||
## Usages de la passerelle
|
||||
** Notez que plusieurs comptes WhatsApp et Matrix peuvent être relayés, chaque compte WhatsApp connecté a son propre Salon d'Administration. Si plusieurs utilisateur.ice.s du Robot sont dans un même groupe WhatsApp, seul un Salon Matrix sera créé par la passerelle. **
|
||||
|
||||
### Relayer TOUTES les conversations entre UN compte WhatsApp et UN compte Matrix
|
||||
* Prérequis : votre compte Matrix ou le serveur sur lequel il est hébergé doit être autorisé dans la configuration de la passerelle (voir ci-dessous)
|
||||
* Invitez le Robot (par défaut @whatsappbot:synapse.votredomaine) à une nouvelle conversation.
|
||||
* Ce nouveau salon d'administration du Robot Mautrix-WhatsApp est appelé "Administration Room".
|
||||
* Tapez ``login``
|
||||
* Scannez le QR-code avec la caméra Whatsapp de votre Machine Virtuelle ou ordiphone (option WhatsApp Web dans l'appli)
|
||||
* Envoyez ``help`` au Robot dans le "Administration Room" pour une liste des commandes d'administration de la passerelle.
|
||||
Voir aussi [upstream wiki Authentication page](https://docs.mau.fi/bridges/go/whatsapp/authentication.html)
|
||||
|
||||
### Robot-Relai "Relaybot": Relayer les conversations de TOUS les comptes Matrix et TOUS les comptes WhatsApp présents dans UN groupe/salon
|
||||
|
||||
1. Activer l'option `Should Relay Mode be allowed?` dans le panneau de configuration (section `Main Settings -> Puppetting Bridge Settings`) ou dans le fichier YAML de configuration du robot `relay: enabled: true`. Assurez-vous également que les utilisateurs que vous voulez inviter ont au moins le niveau `relay` dans la section `permissions` (ceci peut être configuré dans la section `Main Settings -> Permissions for using the bridge` du panneau de configuration).
|
||||
2. En fonction de ce qui a été sélectionné lors de l'installation, cela peut être fait uniquement par les administrateurs, mais peut également être modifié dans la section `Main Settings -> Puppetting Bridge Settings` du panneau de configuration ou dans le fichier YAML de configuration du robot `relay: admin_only`
|
||||
3. Ecrivez `!wa set-relay` dans chacune des pièces que vous voulez relayer pour (ré)activer la fonction de relaybot.
|
||||
|
||||
* Vous pouvez maintenant relayer un groupe WhatsApp en y invitant le numéro de téléphone du compte WhatsApp connecté au RobotRelai. Côté WhatsApp, tous les messages venant de Matrix seront vus comme envoyés depuis le compte WhatsApp connecté, avec un préfix indiquant le compte Matrix correspondant. Côté Matrix, la passerelle va créer des comptes Matrix pour chaque compte WhatsApp présent dans le groupe relayé. Les messages sont indiqués comme provenant soit du numéro de téléphone, soit du pseudo WhatsApp.
|
||||
Voir aussi [la page wiki principale sur le Robot-Relai](https://docs.mau.fi/bridges/go/whatsapp/relaybot.html)
|
33
doc/PRE_INSTALL.md
Normal file
33
doc/PRE_INSTALL.md
Normal file
|
@ -0,0 +1,33 @@
|
|||
## Multi-user support
|
||||
|
||||
* Bot users are not related to Yunohost users. Any Matrix account or Synapse server autorized in the configuration of the bridge can invite/use the bot.
|
||||
* The WhatsApp bot is a local Matrix-Synapse user, but accessible through federation (synapse public or private).
|
||||
* Several WhatsApp and Matrix users can be bridged with one bridge, each user has its own bot administration room.
|
||||
* If several bot users are in a same WhatsApp group, only one Matrix room will be created by the bridge.
|
||||
* See https://github.com/YunoHost-Apps/synapse_ynh#multi-users-support
|
||||
|
||||
## Limitations
|
||||
|
||||
* Audio/Video calls are not bridged yet.
|
||||
* If WhatsApp loses connection, e.g. the phone is set in flight mode or push notifications are deactivated, the bot has sometimes to be restarted manually by sending a reconnnect message in the matrix administration room.
|
||||
* WhatsApp needs to get presence from the official app every two weeks at least, so bridge will send a reminder in the administration room.
|
||||
|
||||
## Additional information
|
||||
|
||||
* It is recommended to install WhatsApp on a virtual android running on a server, see [upstream wiki Android-VM-Setup page](https://docs.mau.fi/bridges/go/whatsapp/android-vm-setup.html)
|
||||
**More information on the documentation page:**
|
||||
https://docs.mau.fi/bridges/go/whatsapp/index.html
|
||||
|
||||
To test communication between the App Service and Matrix-Synapse on a VM (e.g. with domain name: synapse.vm), you must install a certificate:
|
||||
```
|
||||
echo | openssl s_client -showcerts -servername synapse.vm -connect synapse.vm:443 2>/dev/null | awk '/-----BEGIN CERTIFICATE-----/, /-----END CERTIFICATE-----/' >> /usr/local/share/ca-certificates/synapse.vm.crt
|
||||
update-ca-certificates
|
||||
```
|
||||
|
||||
## Miscellaneous information
|
||||
|
||||
* Matrix room (matrix bridges in YunoHost): #mautrix_yunohost:matrix.fdn.fr
|
||||
* Matrix room (upstream app): #whatsapp:maunium.net
|
||||
In case you need to upload your logs somewhere, be aware that they contain your contacts' and your phone numbers. Strip them out with
|
||||
``| sed -r 's/[0-9]{10,}/📞/g' ``
|
||||
* "Mautrix-WhatsApp" bridge is based on the [Rhymen/go-whatsapp](https://github.com/Rhymen/go-whatsapp) implementation of the [sigalor/whatsapp-web-reveng](https://github.com/sigalor/whatsapp-web-reveng) project.
|
31
doc/PRE_INSTALL_fr.md
Normal file
31
doc/PRE_INSTALL_fr.md
Normal file
|
@ -0,0 +1,31 @@
|
|||
## Support multi-comptes
|
||||
|
||||
* Les utilisateur.ice.s du Robot ne sont pas liés aux comptes Yunohost. N'importe quel compte Matrix ou serveur Synapse autorisés dans la configuration de la passerelle peut inviter/utiliser le Robot.
|
||||
* Le robot WhatsApp est un utilisateur Matrix-Synapse local, mais accessible via la fédération (Synapse public ou privé).
|
||||
* Plusieurs comptes WhatsApp et Matrix peuvent être liés avec une seule passerelle, chaque compte a son propre salon d'administration.
|
||||
* Si plusieurs utilisateur.ice.s du Robot sont dans un même groupe WhatsApp, seul un Salon Matrix sera créé par la passerelle. Autrement dit, la passerelle construit un seul miroir du réseau de discussion existant sur WhatsApp (utilisateurs et salons).
|
||||
* Voir https://github.com/YunoHost-Apps/synapse_ynh#multi-users-support
|
||||
|
||||
## Limitations
|
||||
|
||||
* Les appels Audio/Video ne sont pas relayés. Seule une notification apparait.
|
||||
* Si WhatsApp perd la connexion, par ex. l'ordiphone est mis en mode avion ou les notifications poussées sont désactivées, le robot doit parfois être redémarré à la main en envoyant un message ``wa !reconnnect`` dans le salon d'administration.
|
||||
* WhatsApp doit obtenir la présence de l'application officielle toutes les deux semaines au moins, c'est pourquoi le robot enverra un rappel dans la salle d'administration.
|
||||
|
||||
## Informations additionnelles
|
||||
|
||||
* Il est recommandé d'installer WhatsApp sur une machine Android virtuelle tournant sur un serveur, cf. le [page Android-VM-Setup du wiki](https://docs.mau.fi/bridges/go/whatsapp/android-vm-setup.html)
|
||||
|
||||
Pour tester la communication entre le Service d'Application et Matrix-Synapse sur une Machine Virtuelle (ex. avec un nom de domaine: synapse.vm), vous devez installer un certificat:
|
||||
```
|
||||
echo | openssl s_client -showcerts -servername synapse.vm -connect synapse.vm:443 2>/dev/null | awk '/-----BEGIN CERTIFICATE-----/, /-----END CERTIFICATE-----/' >> /usr/local/share/ca-certificates/synapse.vm.crt
|
||||
update-ca-certificates
|
||||
```
|
||||
|
||||
## Informations diverses
|
||||
|
||||
* Salon Matrix sur les Passerelles dans Yunohost): #mautrix_yunohost:matrix.fdn.fr
|
||||
* Salon Matrix (application principale): #whatsapp:maunium.net
|
||||
Si vous devez téléverser vos fichiers log quelque-part, soyez avertis qu'ils contiennent des informations sur vos contacts et vos numéros de téléphone. Effacez-les avec
|
||||
``| sed -r 's/[0-9]{10,}/📞/g' ``
|
||||
* La passerelle "Mautrix-WhatsApp" repose sur l'implémentation [Rhymen/go-whatsapp](https://github.com/Rhymen/go-whatsapp) du projet [sigalor/whatsapp-web-reveng](https://github.com/sigalor/whatsapp-web-reveng).
|
|
@ -10,14 +10,6 @@
|
|||
source ../settings/scripts/_common.sh
|
||||
source /usr/share/yunohost/helpers
|
||||
|
||||
#=================================================
|
||||
# MANAGE SCRIPT FAILURE
|
||||
#=================================================
|
||||
|
||||
ynh_clean_setup () {
|
||||
true
|
||||
}
|
||||
|
||||
#=================================================
|
||||
# DECLARE DATA AND CONF FILES TO BACKUP
|
||||
#=================================================
|
||||
|
|
|
@ -9,14 +9,6 @@
|
|||
source _common.sh
|
||||
source /usr/share/yunohost/helpers
|
||||
|
||||
#=================================================
|
||||
# MANAGE SCRIPT FAILURE
|
||||
#=================================================
|
||||
|
||||
ynh_clean_setup () {
|
||||
true
|
||||
}
|
||||
|
||||
# Retrieve some values from selected Synapse instance and store them
|
||||
server_name=$(ynh_app_setting_get --app $synapse_instance --key server_name)
|
||||
domain=$(ynh_app_setting_get --app $synapse_instance --key domain)
|
||||
|
|
|
@ -10,14 +10,6 @@
|
|||
source ../settings/scripts/_common.sh
|
||||
source /usr/share/yunohost/helpers
|
||||
|
||||
#=================================================
|
||||
# MANAGE SCRIPT FAILURE
|
||||
#=================================================
|
||||
|
||||
ynh_clean_setup () {
|
||||
true
|
||||
}
|
||||
|
||||
server_name=$(ynh_app_setting_get --app=$app --key=server_name)
|
||||
|
||||
synapse_db_name="matrix_$synapse_instance"
|
||||
|
@ -41,8 +33,6 @@ chown -R $app:$app "$install_dir"
|
|||
#=================================================
|
||||
ynh_script_progression --message="Restoring the PostgreSQL database..." --weight=8
|
||||
|
||||
ynh_psql_test_if_first_run
|
||||
ynh_psql_setup_db --db_user=$db_user --db_name=$db_name --db_pwd=$db_pwd
|
||||
ynh_psql_execute_file_as_root --file="./db.sql" --database=$db_name
|
||||
|
||||
#=================================================
|
||||
|
|
|
@ -30,9 +30,9 @@ args.botusers = "server.name"
|
|||
# Commits to test upgrade from
|
||||
# -------------------------------
|
||||
|
||||
test_upgrade_from.717b32f4.name = "Upgrade from 0.4.0"
|
||||
test_upgrade_from.1d57a3b.name = "Upgrade from 0.7.2" # After config panel was implemented
|
||||
|
||||
test_upgrade_from.fdd1e0ff.name = "Upgrade from 0.6.1"
|
||||
test_upgrade_from.ede12ed.name = "Upgrade from 0.8.0"
|
||||
|
||||
|
||||
# This is an additional test suite
|
||||
|
|
Loading…
Add table
Reference in a new issue