Procházet zdrojové kódy

Implement feedback from PR #1931

pull/1931/head
teutat3s před 3 roky
rodič
revize
32a604d7c1
V databázi nebyl nalezen žádný známý klíč pro tento podpis ID GPG klíče: 18DAE600A6BBE705
5 změnil soubory, kde provedl 19 přidání a 24 odebrání
  1. +9
    -17
      docs/configuring-well-known.md
  2. +6
    -5
      roles/matrix-base/defaults/main.yml
  3. +1
    -0
      roles/matrix-base/tasks/setup_well_known.yml
  4. +2
    -2
      roles/matrix-base/templates/static-files/well-known/matrix-support.j2
  5. +1
    -0
      roles/matrix-nginx-proxy/tasks/setup_well_known.yml

+ 9
- 17
docs/configuring-well-known.md Zobrazit soubor

@@ -47,23 +47,15 @@ The two playbook variables that you could look for, if you're interested in bein
Example snippet for `vars.yml`:
```
# Homeserver admin contacts as per MSC 1929 https://github.com/matrix-org/matrix-spec-proposals/pull/1929
matrix_homeserver_admin_contacts: |
[
{
"matrix_id": "@admin1:domain.tld",
"email_address": "admin@domain.tld",
"role": "admin"
},
{
"matrix_id": "@admin2:domain.tld",
"email_address": "admin@domain.tld",
"role": "admin"
},
{
"email_address": "security@domain.tld",
"role": "security"
}
]
matrix_homeserver_admin_contacts:
- matrix_id: @admin1:domain.tld
email_address: admin@domain.tld
role: admin
- matrix_id: @admin2:domain.tld
email_address: admin@domain.tld
role: admin
- email_address: security@domain.tld
role: security

matrix_homeserver_support_url: "https://example.domain.tld/support"
```


+ 6
- 5
roles/matrix-base/defaults/main.yml Zobrazit soubor

@@ -14,12 +14,13 @@ matrix_admin: ''

# Homeserver admin contacts and support page as per MSC 1929
# See: https://github.com/matrix-org/matrix-spec-proposals/pull/1929
#
# Users in form:
# [
# { "matrix_id": "@admin:domain.tld", "email_address": "admin@domain.tld", "role": "admin" },
# { "email_address": "security@domain.tld", "role": "security" }
# ]
# matrix_homeserver_admin_contacts:
# - matrix_id: @admin:domain.tld
# email_address: admin@domain.tld
# role: admin
# - email_address: security@domain.tld
# role: security
matrix_homeserver_admin_contacts: []
# Url string like https://domain.tld/support.html
matrix_homeserver_support_url: ''


+ 1
- 0
roles/matrix-base/tasks/setup_well_known.yml Zobrazit soubor

@@ -43,3 +43,4 @@
mode: 0644
owner: "{{ matrix_user_username }}"
group: "{{ matrix_user_groupname }}"
when: matrix_homeserver_admin_contacts|length > 0

+ 2
- 2
roles/matrix-base/templates/static-files/well-known/matrix-support.j2 Zobrazit soubor

@@ -1,7 +1,7 @@
#jinja2: lstrip_blocks: "True"
{
{% if matrix_homeserver_admin_contacts %}
"admins": {{ matrix_homeserver_admin_contacts }}
{% if matrix_homeserver_admin_contacts|length > 0 %}
"admins": {{ matrix_homeserver_admin_contacts|to_json }}
{% endif %}
{% if matrix_homeserver_support_url %},
"support_page": "{{ matrix_homeserver_support_url }}"


+ 1
- 0
roles/matrix-nginx-proxy/tasks/setup_well_known.yml Zobrazit soubor

@@ -31,3 +31,4 @@
mode: 0644
owner: "{{ matrix_user_username }}"
group: "{{ matrix_user_groupname }}"
when: matrix_homeserver_admin_contacts|length > 0

Načítá se…
Zrušit
Uložit