Enable location sharing in Element (#2276)
* Enable location sharing in Element * Update roles/custom/matrix-client-element/tasks/validate_config.yml Co-authored-by: Slavi Pantaleev <slavi@devture.com> * Update roles/custom/matrix-client-element/tasks/setup_install.yml Co-authored-by: Slavi Pantaleev <slavi@devture.com> * Rename location sharing vars to be consistent with other vars * Rename style.json to map_style.json * Add m.tile_server section to /.well-known/matrix/client Co-authored-by: Slavi Pantaleev <slavi@devture.com>
This commit is contained in:
@ -135,3 +135,70 @@ matrix_client_element_configuration_extension: "{{ matrix_client_element_configu
|
||||
# Holds the final Element configuration (a combination of the default and its extension).
|
||||
# You most likely don't need to touch this variable. Instead, see `matrix_client_element_configuration_default`.
|
||||
matrix_client_element_configuration: "{{ matrix_client_element_configuration_default | combine(matrix_client_element_configuration_extension, recursive=True) }}"
|
||||
|
||||
# Element Location sharing functionality
|
||||
# More info: https://element.io/blog/element-launches-e2ee-location-sharing/
|
||||
# How to host your own map tile server: https://matrix.org/docs/guides/map-tile-server
|
||||
matrix_client_element_location_sharing_enabled: false
|
||||
|
||||
# Default Element location sharing map style configuration template which covers the generic use case.
|
||||
# You can customize it by controlling the various variables inside it.
|
||||
#
|
||||
# For a more advanced customization, you can extend the default (see `matrix_client_element_location_sharing_map_style_extension_json`)
|
||||
# or completely replace this variable with your own template.
|
||||
#
|
||||
# The side-effect of this lookup is that Ansible would even parse the JSON for us, returning a dict.
|
||||
# This is unlike what it does when looking up YAML template files (no automatic parsing there).
|
||||
matrix_client_element_location_sharing_map_style_default: "{{ lookup('template', 'templates/map_style.json.j2') }}"
|
||||
|
||||
# Your custom JSON configuration for Element location sharing map style should go to `matrix_client_element_location_sharing_map_style_extension_json`.
|
||||
# This configuration extends the default starting configuration (`matrix_client_element_location_sharing_map_style_default`).
|
||||
#
|
||||
# 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_client_element_location_sharing_map_style_default`.
|
||||
#
|
||||
# Example configuration override follows:
|
||||
#
|
||||
# matrix_client_element_location_sharing_map_style_extension_json: |
|
||||
# {
|
||||
# "sources": {
|
||||
# "localsource": {
|
||||
# "tileSize": 512
|
||||
# }
|
||||
# }
|
||||
# }
|
||||
#
|
||||
# Example configuration extension follows:
|
||||
#
|
||||
# matrix_client_element_location_sharing_map_style_extension_json: |
|
||||
# {
|
||||
# "sources": {
|
||||
# "anothersource": {
|
||||
# "attribution": "",
|
||||
# "tileSize": 256,
|
||||
# "tiles": ["https://anothertile.example.com/{z}/{x}/{y}.png"],
|
||||
# "type": "raster"
|
||||
# }
|
||||
# }
|
||||
# }
|
||||
matrix_client_element_location_sharing_map_style_extension_json: '{}'
|
||||
|
||||
matrix_client_element_location_sharing_map_style_extension: "{{ matrix_client_element_location_sharing_map_style_extension_json | from_json if matrix_client_element_location_sharing_map_style_extension_json | from_json is mapping else {} }}"
|
||||
|
||||
# Holds the final Element location sharing map style configuration (a combination of the default and its extension).
|
||||
# You most likely don't need to touch this variable. Instead, see `matrix_client_element_location_sharing_map_style_default`.
|
||||
matrix_client_element_location_sharing_map_style: "{{ matrix_client_element_location_sharing_map_style_default | combine(matrix_client_element_location_sharing_map_style_extension, recursive=True) }}"
|
||||
|
||||
# Example tile servers configuration
|
||||
# matrix_client_element_location_sharing_map_style_content_sources_localsource_tiles: ["https://tile.example.com/{z}/{x}/{y}.png"]
|
||||
# or
|
||||
# matrix_client_element_location_sharing_map_style_content_sources_localsource_tiles: ["https://s1.example.com/{z}/{x}/{y}.png", "https://s2.example.com/{z}/{x}/{y}.png", "https://s3.example.com/{z}/{x}/{y}.png"]
|
||||
matrix_client_element_location_sharing_map_style_content_sources_localsource_tiles: []
|
||||
|
||||
# Map attribution (optional):
|
||||
# Attribution for OpenStreetMap would be like this:
|
||||
# matrix_client_element_location_sharing_map_style_content_sources_localsource_attribution: "© <a href=\"https://www.openstreetmap.org/copyright\" target=\"_blank\">OpenStreetMap</a> contributors"
|
||||
# Leave blank, if map does not require attribution.
|
||||
matrix_client_element_location_sharing_map_style_content_sources_localsource_attribution: ""
|
||||
|
Reference in New Issue
Block a user