forked from Gredin67/mautrix_python_template_ynh
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* v0.3.0 * Changes to match the signal_ynh package and improve backup, restore, and upgrade. It should fix issue #4 * Change: fix error in multi_instance install with the pre-installation of synapse. * Auto-update README * new url upstream repo Co-authored-by: Alexandre Aubin <[email protected]> Co-authored-by: nathanael-h <[email protected]> Co-authored-by: tituspijean <[email protected]> Co-authored-by: Yunohost-Bot <>
- Loading branch information
1 parent
846f76e
commit 0b7c2eb
Showing
21 changed files
with
1,016 additions
and
1,058 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,110 +1,36 @@ | ||
# A Matrix-Facebook puppeting bridge for YunoHost | ||
<!-- | ||
N.B.: This README was automatically generated by https://github.com/YunoHost/apps/tree/master/tools/README-generator | ||
It shall NOT be edited by hand. | ||
--> | ||
|
||
# Matrix-Facebook bridge for YunoHost | ||
|
||
[![Integration level](https://dash.yunohost.org/integration/mautrix_facebook.svg)](https://dash.yunohost.org/appci/app/mautrix_facebook) ![](https://ci-apps.yunohost.org/ci/badges/mautrix_facebook.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/mautrix_facebook.maintain.svg) | ||
[![Install Mautrix-Facebook with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=mautrix_facebook) | ||
[![Install Matrix-Facebook bridge with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=mautrix_facebook) | ||
|
||
*[Lire ce readme en français.](./README_fr.md)* | ||
|
||
> *This package allows you to install Mautrix-Facebook quickly and simply on a YunoHost server. | ||
> *This package allows you to install Matrix-Facebook bridge quickly and simply on a YunoHost server. | ||
If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/install) to learn how to install it.* | ||
|
||
## Overview | ||
A puppeting bridge between Matrix and Facebook packaged as a YunoHost service. Messages, notifications (and sometimes media) are bridged between a Facebook user and a Matrix user. Currently the Matrix user can NOT invite other Matrix user in a bridged Facebook room, so only someone with a Facebook account can participate to Facebook group conversations. The ["Mautrix-Facebook"](https://docs.mau.fi/bridges/python/facebook/index.html) bridge consists in a Synapse App Service and relies on postgresql (mysql also possible). Therefore, [Synapse for YunoHost](https://github.com/YunoHost-Apps/synapse_ynh) should be installed beforehand. | ||
|
||
**Shipped version:** 0.2.0 | ||
|
||
## Screenshots | ||
|
||
![](Link to a screenshot of this app.) | ||
|
||
## List of known public services | ||
|
||
* Ask on one of the following rooms: #mautrix_yunohost:matrix.fdn.fr or #facebook:maunium.net | ||
|
||
## Bridging usage | ||
** Note that several Facebook and Matrix users can be bridged, each Facebook account has its own bot administration room. If they are in a same Facebook group, only one matrix room will be created. ** | ||
|
||
### Bridge a Facebook user and a Matrix user | ||
* First your Matrix user or Synapse Server has to be authorized in the Configuration of the bridge (see below) | ||
* Then, invite the bot (default @facebookbot:yoursynapse.domain) | ||
* If the Bot does bot accept, see the [troubleshooting page](https://docs.mau.fi/bridges/general/troubleshooting.html) | ||
* Type ``!fb login <email> <password>``, where ``<email>`` and ``<password>`` are your Facebook email and password, e.g. ``!fb login [email protected] facebookpwd`` | ||
* If you have 2FA enabled, the bot will ask you to send the 2FA token. | ||
* By defaults, only conversations with very recent messages will be bridged | ||
* Accept invitations to the bridged chat rooms | ||
* Send ``!sg help`` to the bot in this new Mautrix-Facebook bot administration room to know how to control the bot. | ||
See also [upstream wiki Authentication page](https://docs.mau.fi/bridges/python/facebook/authentication.html) | ||
|
||
### Double puppeting | ||
* First login as described in the previous section | ||
* Connect to the Matrix-Synapse Server to get an access token, for example with the command ``curl -XPOST -d '{"type":"m.login.password","identifier":{"type": "m.id.user", "user": "matrixusername"},"password":"matrixpassword","initial_device_display_name":"mautrix-facebook"}' https://yoursynapse.domain/_matrix/client/r0/login`` | ||
* Send ``login-matrix <access token>``, where ``<access token>`` is the token received from the Server. | ||
* After logging in, the default Matrix puppet of your Facebook account should leave rooms and your account should join all rooms the puppet was in automatically. | ||
|
||
|
||
### Relaybot: Bridge a group for several Matrix and several Facebook users to chat together | ||
Not yet available | ||
|
||
## Configuration of the bridge | ||
|
||
The bridge is [roughly configured at installation](https://github.com/YunoHost-Apps/mautrix_facebook_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_facebook/config.yaml``` | ||
and then restarting the mautrix_facebook service. | ||
|
||
## Documentation | ||
A Facebook puppeting bridge for Matrix/Synapse. | ||
|
||
* Official "Mautrix-Facebook" documentation: https://docs.mau.fi/bridges/python/facebook/index.html | ||
* Matrix room (Matrix Bridges in Yunohost): #mautrix_yunohost:matrix.fdn.fr | ||
* Matrix room (upstream app): #facebook: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' `` | ||
* YunoHost documentation: If more specific documentation is needed, feel free to contribute. | ||
**Shipped version:** 0.3.0~ynh1 | ||
|
||
## 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 Facebook bot is a local Matrix-Synapse user, but accessible through federation (synapse public or private). | ||
* Several Facebook 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 Facebook group, only one Matrix room will be created by the bridge. | ||
* See https://github.com/YunoHost-Apps/synapse_ynh#multi-users-support | ||
## Documentation and resources | ||
|
||
#### 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 Facebook 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 | ||
|
||
* x86-64 - [![Build Status](https://ci-apps.yunohost.org/ci/logs/mautrix_facebook%20%28Apps%29.svg)](https://ci-apps.yunohost.org/ci/apps/mautrix_facebook/) | ||
* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/mautrix_facebook%20%28Apps%29.svg)](https://ci-apps-arm.yunohost.org/ci/apps/mautrix_facebook/) | ||
|
||
## Limitations | ||
|
||
* It looks like media are not bridged. | ||
|
||
## Additional information | ||
|
||
* Other info you would like to add about this app. | ||
|
||
**More info on the documentation page:** | ||
https://docs.mau.fi/bridges/python/facebook/index.html | ||
|
||
## Links | ||
|
||
* Report a bug: https://github.com/YunoHost-Apps/mautrix_facebook_ynh/issues | ||
* App website: https://github.com/YunoHost-Apps/mautrix-whatsapp_ynh | ||
* Upstream app documentation: https://docs.mau.fi/bridges/python/facebook/index.html | ||
* Upstream app repository: https://github.com/tulir/mautrix-facebook | ||
* YunoHost website: https://yunohost.org/ | ||
|
||
--- | ||
* Official user documentation: https://docs.mau.fi/bridges/python/facebook/index.html | ||
* Official admin documentation: https://docs.mau.fi/bridges/python/setup/index.html?bridge=facebook | ||
* Upstream app code repository: https://github.com/mautrix/facebook | ||
* YunoHost documentation for this app: https://yunohost.org/app_mautrix_facebook | ||
* Report a bug: https://github.com/YunoHost-Apps/mautrix_facebook_ynh/issues | ||
|
||
## Developer info | ||
|
||
**Only if you want to use a testing branch for coding, instead of merging directly into master.** | ||
Please send your pull request to the [testing branch](https://github.com/YunoHost-Apps/mautrix_facebook_ynh/tree/testing). | ||
|
||
To try the testing branch, please proceed like that. | ||
|
@@ -114,8 +40,4 @@ or | |
sudo yunohost app upgrade mautrix_facebook -u https://github.com/YunoHost-Apps/mautrix_facebook_ynh/tree/testing --debug | ||
``` | ||
|
||
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 | ||
``` | ||
**More info regarding app packaging:** https://yunohost.org/packaging_apps |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,75 +1,39 @@ | ||
# App exemple pour YunoHost | ||
# Matrix-Facebook bridge pour YunoHost | ||
|
||
[![Niveau d'intégration](https://dash.yunohost.org/integration/REPLACEBYYOURAPP.svg)](https://dash.yunohost.org/appci/app/REPLACEBYYOURAPP) ![](https://ci-apps.yunohost.org/ci/badges/REPLACEBYYOURAPP.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/REPLACEBYYOURAPP.maintain.svg) | ||
[![Installer REPLACEBYYOURAPP avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=REPLACEBYYOURAPP) | ||
[![Niveau d'intégration](https://dash.yunohost.org/integration/mautrix_facebook.svg)](https://dash.yunohost.org/appci/app/mautrix_facebook) ![](https://ci-apps.yunohost.org/ci/badges/mautrix_facebook.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/mautrix_facebook.maintain.svg) | ||
[![Installer Matrix-Facebook bridge avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=mautrix_facebook) | ||
|
||
*[Read this readme in english.](./README.md)* | ||
*[Read this readme in english.](./README.md)* | ||
*[Lire ce readme en français.](./README_fr.md)* | ||
|
||
> *Ce package vous permet d'installer REPLACEBYYOURAPP rapidement et simplement sur un serveur YunoHost. | ||
Si vous n'avez pas YunoHost, consultez [le guide](https://yunohost.org/#/install) pour apprendre comment l'installer.* | ||
> *Ce package vous permet d'installer Matrix-Facebook bridge rapidement et simplement sur un serveur YunoHost. | ||
Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour savoir comment l'installer et en profiter.* | ||
|
||
## Vue d'ensemble | ||
Description rapide de cette application. | ||
|
||
**Version incluse :** 1.0 | ||
Passerelle Facebook pour Matrix/Synapse. | ||
|
||
## Captures d'écran | ||
**Version incluse :** 0.3.0~ynh1 | ||
|
||
![](Lien vers une capture d'écran de cette application.) | ||
|
||
## Démo | ||
|
||
* [Démo officielle](Lien vers un site de démonstration de cette application.) | ||
## Documentations et ressources | ||
|
||
## Configuration | ||
|
||
Comment configurer cette application : via le panneau d'administration, un fichier brut en SSH ou tout autre moyen. | ||
|
||
## Documentation | ||
|
||
* Documentation officielle : Lien vers la documentation officielle de cette application. | ||
* Documentation YunoHost : Si une documentation spécifique est nécessaire, n'hésitez pas à contribuer. | ||
|
||
## Caractéristiques spécifiques YunoHost | ||
|
||
#### Support multi-utilisateur | ||
|
||
* L'authentification LDAP et HTTP est-elle prise en charge ? | ||
* L'application peut-elle être utilisée par plusieurs utilisateurs ? | ||
|
||
#### Architectures supportées | ||
|
||
* x86-64 - [![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/) | ||
|
||
## Limitations | ||
|
||
* Limitations connues. | ||
|
||
## Informations additionnelles | ||
|
||
* Autres informations que vous souhaitez ajouter sur cette application. | ||
|
||
**Plus d'informations sur la page de documentation :** | ||
https://yunohost.org/packaging_apps | ||
|
||
## Liens | ||
|
||
* Signaler un bug : https://github.com/YunoHost-Apps/REPLACEBYYOURAPP_ynh/issues | ||
* Site de l'application : Lien vers le site officiel de cette application. | ||
* Dépôt de l'application principale : Lien vers le dépôt officiel de l'application principale. | ||
* Site web YunoHost : https://yunohost.org/ | ||
|
||
--- | ||
* Documentation officielle utilisateur : https://docs.mau.fi/bridges/python/facebook/index.html | ||
* Documentation officielle de l'admin : https://docs.mau.fi/bridges/python/setup/index.html?bridge=facebook | ||
* Dépôt de code officiel de l'app : https://github.com/mautrix/facebook | ||
* Documentation YunoHost pour cette app : https://yunohost.org/app_mautrix_facebook | ||
* Signaler un bug : https://github.com/YunoHost-Apps/mautrix_facebook_ynh/issues | ||
|
||
## Informations pour les développeurs | ||
|
||
**Seulement si vous voulez utiliser une branche de test pour le codage, au lieu de fusionner directement dans la banche principale.** | ||
Merci de faire vos pull request sur la [branche testing](https://github.com/YunoHost-Apps/REPLACEBYYOURAPP_ynh/tree/testing). | ||
Merci de faire vos pull request sur la [branche testing](https://github.com/YunoHost-Apps/mautrix_facebook_ynh/tree/testing). | ||
|
||
Pour essayer la branche testing, procédez comme suit. | ||
``` | ||
sudo yunohost app install https://github.com/YunoHost-Apps/REPLACEBYYOURAPP_ynh/tree/testing --debug | ||
sudo yunohost app install https://github.com/YunoHost-Apps/mautrix_facebook_ynh/tree/testing --debug | ||
ou | ||
sudo yunohost app upgrade REPLACEBYYOURAPP -u https://github.com/YunoHost-Apps/REPLACEBYYOURAPP_ynh/tree/testing --debug | ||
sudo yunohost app upgrade mautrix_facebook -u https://github.com/YunoHost-Apps/mautrix_facebook_ynh/tree/testing --debug | ||
``` | ||
|
||
**Plus d'infos sur le packaging d'applications :** https://yunohost.org/packaging_apps |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# See here for more information | ||
# https://github.com/YunoHost/package_check#syntax-check_process-file | ||
|
||
;; Default test serie | ||
; pre-install | ||
sudo yunohost tools update apps | ||
sudo yunohost app info synapse --quiet > /dev/null || sudo yunohost app install https://github.com/YunoHost-Apps/synapse_ynh/ -a "domain=$domain&server_name=$server_name&is_public=$is_public&jitsi_server=$jitsi_server" --force | ||
; Manifest | ||
port="8449" (PORT) | ||
synapsenumber="1" | ||
botname="facebookbot" | ||
bot_synapse_adm=0 | ||
encryption=0 | ||
botadmin="@johndoe:synapsedomain.tld" (USER) | ||
botusers="@johndoe:synapsedomain.tld" | ||
; Checks | ||
pkg_linter=1 | ||
setup_sub_dir=0 | ||
setup_root=0 | ||
setup_nourl=1 | ||
setup_private=0 | ||
setup_public=0 | ||
upgrade=1 | ||
upgrade=1 from_commit=01514cf02f52773a8164d512d59687c121852152 | ||
backup_restore=1 | ||
multi_instance=1 | ||
port_already_use=1 | ||
change_url=0 | ||
actions=0 | ||
config_panel=0 | ||
;;; Upgrade options | ||
; commit=01514cf02f52773a8164d512d59687c121852152 | ||
name=0.2.0 |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.