From 8449f38f81361d0b8c4a1f223c79fcc0a56d8c1e Mon Sep 17 00:00:00 2001 From: Gredin67 <35761345+Gredin67@users.noreply.github.com> Date: Tue, 21 Apr 2020 23:59:45 +0200 Subject: [PATCH] Update README.md --- README.md | 56 +++++++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 44 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index bf2c602..40f4fb6 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ *[Lire ce readme en français.](./README_fr.md)* -> *This package allows you to install Mautrix-WhatsApp quickly and simply on a YunoHost server. +> *This package allows you to install a Mautrix-WhatsApp bridge quickly and simply on a YunoHost server alongside Matrix-Synapse. If you don't have YunoHost, please see [here](https://yunohost.org/#/install) to know how to install and enjoy it.* ## Overview @@ -20,37 +20,67 @@ A puppeting bridge between Matrix and WhatsApp packaged as a YunoHost service. M ## Demo -* [Official demo](Link to a demo site for this app) +* If you want to test the bridge, send an email to the App maintainer with the matrix user account you want to bridge to WhatsApp. -## Configuration +## Bridging usage +### 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) in this new matrix-whatsapp bot 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://github.com/tulir/mautrix-whatsapp/wiki/Authentication) -How to configure this app: by an admin panel, a plain file with SSH, or any other way. +** Note that several WhatsApp and Matrix users can be bridge, each users has its own bot administration room. If they are in a same WhatsApp group, only one matrix room will be created. ** + +### Bridge a WhatsApp group in Matrix "Relaybot" +* First Relaybot option should be enabled in the bridge configuration (default=disabled, see below) +* Once the bot administration room is setup, you can also bridge all messages between a Matrix room and a WhatsApp room/group. +In whatsapp all messages will be sent by the account who is logged in with a prefix for the source matrix user. On the matrix side the bridge will still create matrix users corresponding to the whatsapp users when they send a message. +See also [upstream wiki Relaybot page](https://github.com/tulir/mautrix-whatsapp/wiki/Relaybot) + +## Configuration of the bridge + +The bridge is roughly configured at installation, 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. ## Documentation - * Official documentation: https://github.com/tulir/mautrix-whatsapp/wiki + * Official "mautrix-whatsapp" documentation: https://github.com/tulir/mautrix-whatsapp/wiki + * Matrix room: #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. * YunoHost documentation: If specific documentation is needed, feel free to contribute. ## YunoHost specific features #### Multi-users support -Are LDAP and HTTP auth supported? -Can the app be used by multiple users? +* Bot users are not related to Yunohost users. Any matrix account or server autorized in the configuration of the bridge can 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. + +Multi-instance installation should work, but was not tested yet. A priori it makes only sense if several synapse instances are installed. #### Supported architectures -* x86-64b - [![Build Status](https://ci-apps.yunohost.org/ci/logs/REPLACEBYYOURAPP%20%28Apps%29.svg)](https://ci-apps.yunohost.org/ci/apps/REPLACEBYYOURAPP/) -* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/REPLACEBYYOURAPP%20%28Apps%29.svg)](https://ci-apps-arm.yunohost.org/ci/apps/REPLACEBYYOURAPP/) -* Jessie x86-64b - [![Build Status](https://ci-stretch.nohost.me/ci/logs/REPLACEBYYOURAPP%20%28Apps%29.svg)](https://ci-stretch.nohost.me/ci/apps/REPLACEBYYOURAPP/) +* Tested on ARMv7 in April 2020 +* x86-64b - [![Build Status](https://ci-apps.yunohost.org/ci/logs/mautrix-whatsapp_ynh%20%28Apps%29.svg)](https://ci-apps.yunohost.org/ci/apps/mautrix-whatsapp_ynh/) +* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/mautrix-whatsapp_ynh%20%28Apps%29.svg)](https://ci-apps-arm.yunohost.org/ci/apps/mautrix-whatsapp_ynh/) +* Jessie x86-64b - [![Build Status](https://ci-stretch.nohost.me/ci/logs/mautrix-whatsapp_ynh%20%28Apps%29.svg)](https://ci-stretch.nohost.me/ci/apps/mautrix-whatsapp_ynh/) ## Limitations -* Audio/Video calls are not bridged yet. It is recommended to install whatsapp on a virtual android running on a server. If whatsapp loses connection, e.g. the phone is set in flight mode, the bot has to be restarted by sending a reconnnect message in the matrix administration room. +* 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 -* Other information you would add about this application +* It is recommended to install whatsapp on a virtual android running on a server, see [upstream wiki Android-VM-Setup page](https://github.com/tulir/mautrix-whatsapp/wiki/Android-VM-Setup) **More information on the documentation page:** https://github.com/tulir/mautrix-whatsapp/wiki @@ -60,6 +90,8 @@ https://github.com/tulir/mautrix-whatsapp/wiki * Report a bug: https://github.com/YunoHost-Apps/mautrix-whatsapp_ynh/issues * App website: https://github.com/Gredin67/mautrix-whatsapp_ynh * Upstream app repository: https://github.com/tulir/mautrix-whatsapp + * Up-Upstream repository: https://github.com/Rhymen/go-whatsapp + * Up-Up-Upstream repository: https://github.com/sigalor/whatsapp-web-reveng * YunoHost website: https://yunohost.org/ ---