瀏覽代碼

Set default variables properly and use to_json in template

pull/2381/head
James Collier 3 年之前
父節點
當前提交
b5dfcc79ac
沒有發現已知的金鑰在資料庫的簽署中 GPG 金鑰 ID: CFC9885797777FFA
共有 2 個檔案被更改,包括 8 行新增2 行删除
  1. +6
    -0
      roles/custom/matrix-bridge-mautrix-whatsapp/defaults/main.yml
  2. +2
    -2
      roles/custom/matrix-bridge-mautrix-whatsapp/templates/config.yaml.j2

+ 6
- 0
roles/custom/matrix-bridge-mautrix-whatsapp/defaults/main.yml 查看文件

@@ -102,6 +102,12 @@ matrix_mautrix_whatsapp_bridge_permissions: |
| combine({matrix_admin: 'admin'} if matrix_admin else {})
}}

# Enable bridge relay functionality
matrix_mautrix_whatsapp_bridge_relay_enabled: false

# Only allow admins on this home server to set themselves as a relay user
matrix_mautrix_whatsapp_bridge_relay_admin_only: true

# Default mautrix-whatsapp configuration template which covers the generic use case.
# You can customize it by controlling the various variables inside it.
#


+ 2
- 2
roles/custom/matrix-bridge-mautrix-whatsapp/templates/config.yaml.j2 查看文件

@@ -396,9 +396,9 @@ bridge:
relay:
# Whether relay mode should be allowed. If allowed, `!wa set-relay` can be used to turn any
# authenticated user into a relaybot for that chat.
enabled: {{ matrix_mautrix_whatsapp_bridge_relay_enabled | default(false) }}
enabled: {{ matrix_mautrix_whatsapp_bridge_relay_enabled | to_json }}
# Should only admins be allowed to set themselves as relay users?
admin_only: {{ matrix_mautrix_whatsapp_bridge_relay_admin_only | default(true) }}
admin_only: {{ matrix_mautrix_whatsapp_bridge_relay_admin_only | to_json }}
# The formats to use when sending messages to WhatsApp via the relaybot.
message_formats:
m.text: "<b>{{ '{{ .Sender.Displayname }}' }}</b>: {{ '{{ .Message }}' }}"


Loading…
取消
儲存