Przeglądaj źródła

Fix displayname template to append (iMessage) suffix

pull/5289/head
jasonlaguidice 1 tydzień temu
rodzic
commit
89ff5cba31
3 zmienionych plików z 15 dodań i 4 usunięć
  1. +1
    -1
      roles/custom/matrix-bridge-rustpush/defaults/main.yml
  2. +12
    -1
      roles/custom/matrix-bridge-rustpush/tasks/setup_install.yml
  3. +2
    -2
      roles/custom/matrix-bridge-rustpush/templates/systemd/matrix-rustpush-bridge.service.j2

+ 1
- 1
roles/custom/matrix-bridge-rustpush/defaults/main.yml Wyświetl plik

@@ -38,7 +38,7 @@ matrix_rustpush_bridge_appservice_public_address: ''
# Displayname template for iMessage contacts.
# Available variables: {{.FirstName}}, {{.LastName}}, {{.Nickname}},
# {{.Phone}}, {{.Email}}, {{.ID}}
matrix_rustpush_bridge_network_displayname_template: "{% raw %}{{if .FirstName}}{{.FirstName}}{{if .LastName}} {{.LastName}}{{end}}{{else if .Nickname}}{{.Nickname}}{{else if .Phone}}{{.Phone}}{{else if .Email}}{{.Email}}{{else}}{{.ID}}{{end}}{% endraw %}"
matrix_rustpush_bridge_network_displayname_template: "{% raw %}{{if .FirstName}}{{.FirstName}}{{if .LastName}} {{.LastName}}{{end}}{{else if .Nickname}}{{.Nickname}}{{else if .Phone}}{{.Phone}}{{else if .Email}}{{.Email}}{{else}}{{.ID}}{{end}} (iMessage){% endraw %}"

matrix_rustpush_bridge_cloudkit_backfill: true
matrix_rustpush_bridge_video_transcoding: true


+ 12
- 1
roles/custom/matrix-bridge-rustpush/tasks/setup_install.yml Wyświetl plik

@@ -64,11 +64,22 @@

- name: Ensure rustpush-bridge config.yaml installed
ansible.builtin.copy:
content: "{{ matrix_rustpush_bridge_configuration | to_nice_yaml(indent=2, width=999999) }}"
content: >-
{{
matrix_rustpush_bridge_configuration
| combine({
'network': {
'displayname_template': matrix_rustpush_bridge_network_displayname_template_effective,
},
}, recursive=True)
| to_nice_yaml(indent=2, width=999999)
}}
dest: "{{ matrix_rustpush_bridge_config_path }}/config.yaml"
mode: 0644
owner: "{{ matrix_user_name }}"
group: "{{ matrix_group_name }}"
vars:
matrix_rustpush_bridge_network_displayname_template_effective: "{{ (matrix_rustpush_bridge_configuration.network | default({}, true)).displayname_template | default(matrix_rustpush_bridge_network_displayname_template) }}"
register: matrix_rustpush_bridge_config_result

- name: Ensure rustpush-bridge registration.yaml installed


+ 2
- 2
roles/custom/matrix-bridge-rustpush/templates/systemd/matrix-rustpush-bridge.service.j2 Wyświetl plik

@@ -24,8 +24,8 @@ ExecStartPre={{ devture_systemd_docker_base_host_command_docker }} create \
--cap-drop=ALL \
--network={{ matrix_rustpush_bridge_container_network }} \
--env HOME=/data \
{% if matrix_rustpush_bridge_rust_log %}--env RUST_LOG={{ matrix_rustpush_bridge_rust_log }} \{% endif %}
--mount type=bind,src={{ matrix_rustpush_bridge_config_path }},dst=/config \
{% if matrix_rustpush_bridge_rust_log %} --env RUST_LOG={{ matrix_rustpush_bridge_rust_log }} \
{% endif %} --mount type=bind,src={{ matrix_rustpush_bridge_config_path }},dst=/config \
--mount type=bind,src={{ matrix_rustpush_bridge_data_path }},dst=/data \
--label-file={{ matrix_rustpush_bridge_base_path }}/labels \
--entrypoint /usr/local/bin/matrix-rustpush \


Ładowanie…
Anuluj
Zapisz