2019-05-15 00:34:31 +00:00
# mautrix-facebook is a Matrix <-> Facebook bridge
# See: https://github.com/tulir/mautrix-facebook
matrix_mautrix_facebook_enabled : true
2020-03-07 23:24:00 +00:00
matrix_mautrix_facebook_self_build : false
2019-05-15 00:34:31 +00:00
2019-07-28 15:40:55 +00:00
# See: https://mau.dev/tulir/mautrix-facebook/container_registry
matrix_mautrix_facebook_docker_image : "dock.mau.dev/tulir/mautrix-facebook:latest"
2019-06-10 11:23:51 +00:00
matrix_mautrix_facebook_docker_image_force_pull : "{{ matrix_mautrix_facebook_docker_image.endswith(':latest') }}"
2019-05-15 00:34:31 +00:00
matrix_mautrix_facebook_base_path : "{{ matrix_base_data_path }}/mautrix-facebook"
2019-06-07 11:50:55 +00:00
matrix_mautrix_facebook_config_path : "{{ matrix_mautrix_facebook_base_path }}/config"
matrix_mautrix_facebook_data_path : "{{ matrix_mautrix_facebook_base_path }}/data"
2020-03-07 23:24:00 +00:00
matrix_docker_mautrix_facebook_src_files_path : "{{ matrix_mautrix_facebook_base_path }}/docker-src"
2019-05-15 00:34:31 +00:00
2019-06-07 11:04:59 +00:00
matrix_mautrix_facebook_homeserver_address : 'http://matrix-synapse:8008'
2019-05-15 00:34:31 +00:00
matrix_mautrix_facebook_homeserver_domain : '{{ matrix_domain }}'
2019-07-28 15:42:30 +00:00
matrix_mautrix_facebook_appservice_address : 'http://matrix-mautrix-facebook:29319'
2019-05-15 00:34:31 +00:00
# A list of extra arguments to pass to the container
matrix_mautrix_facebook_container_extra_arguments : [ ]
# List of systemd services that matrix-mautrix-facebook.service depends on.
matrix_mautrix_facebook_systemd_required_services_list : [ 'docker.service' ]
# List of systemd services that matrix-mautrix-facebook.service wants
matrix_mautrix_facebook_systemd_wanted_services_list : [ ]
2019-06-07 11:04:59 +00:00
matrix_mautrix_facebook_appservice_token : ''
matrix_mautrix_facebook_homeserver_token : ''
2020-01-12 18:28:36 +00:00
# Can be set to enable automatic double-puppeting via Shared Secret Auth (https://github.com/devture/matrix-synapse-shared-secret-auth).
matrix_mautrix_facebook_login_shared_secret : ''
2020-01-08 21:36:48 +00:00
# Default configuration template which covers the generic use case.
2019-06-07 11:04:59 +00:00
# You can customize it by controlling the various variables inside it.
#
# For a more advanced customization, you can extend the default (see `matrix_mautrix_facebook_configuration_extension_yaml`)
# or completely replace this variable with your own template.
matrix_mautrix_facebook_configuration_yaml : |
#jinja2: lstrip_blocks: "True"
# Homeserver details
homeserver :
# The address that this appservice can use to connect to the homeserver.
address : {{ matrix_mautrix_facebook_homeserver_address }}
# The domain of the homeserver (for MXIDs, etc).
domain : {{ matrix_mautrix_facebook_homeserver_domain }}
# Whether or not to verify the SSL certificate of the homeserver.
# Only applies if address starts with https://
verify_ssl : true
# Application service host/registration related details
# Changing these values requires regeneration of the registration.
appservice :
# The address that the homeserver can use to connect to this appservice.
address : {{ matrix_mautrix_facebook_appservice_address }}
# The hostname and port where this appservice should listen.
hostname : 0.0 .0 .0
2019-07-28 15:42:30 +00:00
port : 29319
2019-06-07 11:04:59 +00:00
# The maximum body size of appservice API requests (from the homeserver) in mebibytes
# Usually 1 is enough, but on high-traffic bridges you might need to increase this to avoid 413s
max_body_size : 1
# The full URI to the database. SQLite and Postgres are fully supported.
# Other DBMSes supported by SQLAlchemy may or may not work.
# Format examples:
# SQLite: sqlite:///filename.db
# Postgres: postgres://username:password@hostname/dbname
database : sqlite:////data/mautrix-facebook.db
2020-01-12 17:10:05 +00:00
# Public part of web server for out-of-Matrix interaction with the bridge.
public :
# Whether or not the public-facing endpoints should be enabled.
enabled : false
# The prefix to use in the public-facing endpoints.
prefix : /public
# The base URL where the public-facing endpoints are available. The prefix is not added
# implicitly.
external : https://example.com/public
2019-06-07 11:04:59 +00:00
# The unique ID of this appservice.
id : facebook
# Username of the appservice bot.
bot_username : facebookbot
# Display name and avatar for bot. Set to "remove" to remove display name/avatar, leave empty
# to leave display name/avatar as-is.
bot_displayname : Facebook bridge bot
bot_avatar : mxc://maunium.net/ddtNPZSKMNqaUzqrHuWvUADv
# Authentication tokens for AS <-> HS communication.
as_token : "{{ matrix_mautrix_facebook_appservice_token }}"
hs_token : "{{ matrix_mautrix_facebook_homeserver_token }}"
# Bridge config
bridge :
# Localpart template of MXIDs for Facebook users.
# {userid} is replaced with the user ID of the Facebook user.
username_template : "facebook_{userid}"
2019-08-24 09:14:17 +00:00
# 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
2019-06-07 11:04:59 +00:00
# Displayname template for Facebook users.
# {displayname} is replaced with the display name of the Facebook user
# as defined below in displayname_preference.
# Keys available for displayname_preference are also available here.
displayname_template : '{displayname} (FB)'
# Available keys:
# "name" (full name)
# "first_name"
# "last_name"
# "nickname"
# "own_nickname" (user-specific!)
displayname_preference :
- name
# The prefix for commands. Only required in non-management rooms.
command_prefix : "!fb"
# Number of chats to sync (and create portals for) on startup/login.
# Maximum 20, set 0 to disable automatic syncing.
initial_chat_sync : 10
# Whether or not the Facebook users of logged in Matrix users should be
# invited to private chats when the user sends a message from another client.
invite_own_puppet_to_pm : false
# Whether or not to use /sync to get presence, read receipts and typing notifications when using
# your own Matrix account as the Matrix puppet for your Facebook account.
sync_with_custom_puppets : true
2020-01-12 17:10:05 +00:00
# Shared secret for https://github.com/devture/matrix-synapse-shared-secret-auth
#
# If set, custom puppets will be enabled automatically for local users
# instead of users having to find an access token and run `login-matrix`
# manually.
2020-01-12 18:28:36 +00:00
login_shared_secret : {{ matrix_mautrix_facebook_login_shared_secret|to_json }}
2019-06-07 11:04:59 +00:00
# Whether or not to bridge presence in both directions. Facebook allows users not to broadcast
# presence, but then it won't send other users' presence to the client.
presence : true
2020-01-12 17:10:05 +00:00
# Whether or not to update avatars when syncing all contacts at startup.
update_avatar_initial_sync : true
2019-06-07 11:04:59 +00:00
# Permissions for using the bridge.
# Permitted values:
# user - Use the bridge with puppeting.
# admin - Use and administrate the bridge.
# Permitted keys:
# * - All Matrix users
# domain - All users on that homeserver
# mxid - Specific user
permissions :
'{{ matrix_mautrix_facebook_homeserver_domain }}' : user
# Python logging configuration.
#
# See section 16.7.2 of the Python documentation for more info:
# https://docs.python.org/3.6/library/logging.config.html#configuration-dictionary-schema
logging :
version : 1
formatters :
colored :
() : mautrix_facebook.util.ColorFormatter
format : "[%(asctime)s] [%(levelname)s@%(name)s] %(message)s"
normal :
format : "[%(asctime)s] [%(levelname)s@%(name)s] %(message)s"
handlers :
console :
class : logging.StreamHandler
formatter : colored
loggers :
mau :
level : DEBUG
fbchat :
level : DEBUG
2020-01-12 17:10:05 +00:00
hbmqtt :
level : INFO
2019-06-07 11:04:59 +00:00
aiohttp :
level : INFO
root :
level : DEBUG
2019-06-07 12:48:13 +00:00
handlers : [ console]
2019-06-07 11:04:59 +00:00
matrix_mautrix_facebook_configuration_extension_yaml : |
# Your custom YAML configuration goes here.
# This configuration extends the default starting configuration (`matrix_mautrix_facebook_configuration_yaml`).
#
# You can override individual variables from the default configuration, or introduce new ones.
#
# If you need something more special, you can take full control by
# completely redefining `matrix_mautrix_facebook_configuration_yaml`.
matrix_mautrix_facebook_configuration_extension : "{{ matrix_mautrix_facebook_configuration_extension_yaml|from_yaml if matrix_mautrix_facebook_configuration_extension_yaml|from_yaml is mapping else {} }}"
# Holds the final configuration (a combination of the default and its extension).
# You most likely don't need to touch this variable. Instead, see `matrix_mautrix_facebook_configuration_yaml`.
matrix_mautrix_facebook_configuration : "{{ matrix_mautrix_facebook_configuration_yaml|from_yaml|combine(matrix_mautrix_facebook_configuration_extension, recursive=True) }}"
matrix_mautrix_facebook_registration_yaml : |
id : facebook
as_token : "{{ matrix_mautrix_facebook_appservice_token }}"
hs_token : "{{ matrix_mautrix_facebook_homeserver_token }}"
namespaces :
users :
- exclusive : true
2019-06-24 04:50:47 +00:00
regex : '^@facebook_.+:{{ matrix_mautrix_facebook_homeserver_domain|regex_escape }}$'
2019-06-07 11:04:59 +00:00
url : {{ matrix_mautrix_facebook_appservice_address }}
sender_localpart : facebookbot
rate_limited : false
matrix_mautrix_facebook_registration : "{{ matrix_mautrix_facebook_registration_yaml|from_yaml }}"