From c4eebc5355b7d0bb1b9ff636bac8707872863fe3 Mon Sep 17 00:00:00 2001 From: Slavi Pantaleev Date: Sat, 24 Aug 2019 12:14:17 +0300 Subject: [PATCH] Add information about community-grouping for the Facebook bridge --- ...guring-playbook-bridge-mautrix-facebook.md | 25 +++++++++++++++++++ .../defaults/main.yml | 6 +++++ 2 files changed, 31 insertions(+) diff --git a/docs/configuring-playbook-bridge-mautrix-facebook.md b/docs/configuring-playbook-bridge-mautrix-facebook.md index b48281f4..4664decf 100644 --- a/docs/configuring-playbook-bridge-mautrix-facebook.md +++ b/docs/configuring-playbook-bridge-mautrix-facebook.md @@ -43,6 +43,31 @@ https://matrix.DOMAIN/_matrix/client/r0/login - make sure you don't log out the `Mautrix-Facebook` device some time in the future, as that would break the Double Puppeting feature +## Set up community-grouping + +This is an **optional feature** that you may wish to enable. + +The Facebook bridge can create a Matrix community for you, which would contain all your chats and contacts. + +For this to work, the bridge's bot needs to have permissions to create communities (also referred to as groups). +Since the bot is a non-admin user, you need to enable such group-creation for non-privileged users in [Synapse's settings](configuring-playbook-synapse.md). + +Here's an example configuration: + +```yaml +matrix_synapse_configuration_extension_yaml: | + enable_group_creation: true + group_creation_prefix: "unofficial/" + +matrix_mautrix_facebook_configuration_extension_yaml: | + bridge: + community_template: "unofficial/facebook_{localpart}={server}" +``` + +Once the bridge is restarted, it would create a community and invite you to it. You need to accept the community invitation manually. +If you don't see all your contacts, you may wish to send a `sync` message to the bot. + + ## Troubleshooting ### Facebook rejecting login attempts and forcing you to change password diff --git a/roles/matrix-bridge-mautrix-facebook/defaults/main.yml b/roles/matrix-bridge-mautrix-facebook/defaults/main.yml index 41921d75..81b87e7a 100644 --- a/roles/matrix-bridge-mautrix-facebook/defaults/main.yml +++ b/roles/matrix-bridge-mautrix-facebook/defaults/main.yml @@ -82,6 +82,12 @@ matrix_mautrix_facebook_configuration_yaml: | # Localpart template of MXIDs for Facebook users. # {userid} is replaced with the user ID of the Facebook user. username_template: "facebook_{userid}" + # Localpart template for per-user room grouping community IDs. + # The bridge will create these communities and add all of the specific user's portals to the community. + # {localpart} is the MXID localpart and {server} is the MXID server part of the user. + # + # `facebook_{localpart}={server}` is a good value. + community_template: null # Displayname template for Facebook users. # {displayname} is replaced with the display name of the Facebook user # as defined below in displayname_preference.