From 88cff139ed57fc28e12bccbe134be73f17498bff Mon Sep 17 00:00:00 2001 From: Aine Date: Sun, 17 Jul 2022 10:29:45 +0300 Subject: [PATCH 1/2] fix mautrix-whatsapp config --- roles/matrix-bridge-mautrix-whatsapp/templates/config.yaml.j2 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/roles/matrix-bridge-mautrix-whatsapp/templates/config.yaml.j2 b/roles/matrix-bridge-mautrix-whatsapp/templates/config.yaml.j2 index b0b2491e..878fb1db 100644 --- a/roles/matrix-bridge-mautrix-whatsapp/templates/config.yaml.j2 +++ b/roles/matrix-bridge-mautrix-whatsapp/templates/config.yaml.j2 @@ -80,7 +80,7 @@ whatsapp: # Bridge config bridge: # Localpart template of MXIDs for WhatsApp users. - # {% raw %}{{.}}{% endraw %} is replaced with the phone number of the WhatsApp user. + # {{ '{{.}}' }} is replaced with the phone number of the WhatsApp user. username_template: "{{ 'whatsapp_{{.}}' }}" # Displayname template for WhatsApp users. # {{.PushName}} - nickname set by the WhatsApp user @@ -89,7 +89,7 @@ bridge: # The following variables are also available, but will cause problems on multi-user instances: # {{.FullName}} - full name from contact list # {{.FirstName}} - first name from contact list - displayname_template: "{{if .BusinessName}}{{.BusinessName}}{{else if .PushName}}{{.PushName}}{{else}}{{.JID}}{{end}} (WA)" + displayname_template: "{{ '{{if .BusinessName}}{{.BusinessName}}{{else if .PushName}}{{.PushName}}{{else}}{{.JID}}{{end}} (WA)' }}" # Should the bridge create a space for each logged-in user and add bridged rooms to it? # Users who logged in before turning this on should run `!wa sync space` to create and fill the space for the first time. personal_filtering_spaces: false From e3ff6ca01bbc8db98d55da45170723ba295ccd60 Mon Sep 17 00:00:00 2001 From: Aine Date: Sun, 17 Jul 2022 14:16:57 +0300 Subject: [PATCH 2/2] mautrix-whatsapp - fix more vars --- .../templates/config.yaml.j2 | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/roles/matrix-bridge-mautrix-whatsapp/templates/config.yaml.j2 b/roles/matrix-bridge-mautrix-whatsapp/templates/config.yaml.j2 index 878fb1db..8e0e300b 100644 --- a/roles/matrix-bridge-mautrix-whatsapp/templates/config.yaml.j2 +++ b/roles/matrix-bridge-mautrix-whatsapp/templates/config.yaml.j2 @@ -83,12 +83,12 @@ bridge: # {{ '{{.}}' }} is replaced with the phone number of the WhatsApp user. username_template: "{{ 'whatsapp_{{.}}' }}" # Displayname template for WhatsApp users. - # {{.PushName}} - nickname set by the WhatsApp user - # {{.BusinessName}} - validated WhatsApp business name - # {{.Phone}} - phone number (international format) + # {{ '{{.PushName}}' }} - nickname set by the WhatsApp user + # {{ '{{.BusinessName}}' }} - validated WhatsApp business name + # {{ '{{.Phone}}' }} - phone number (international format) # The following variables are also available, but will cause problems on multi-user instances: - # {{.FullName}} - full name from contact list - # {{.FirstName}} - first name from contact list + # {{ '{{.FullName}}' }} - full name from contact list + # {{ '{{.FirstName}}' }} - first name from contact list displayname_template: "{{ '{{if .BusinessName}}{{.BusinessName}}{{else if .PushName}}{{.PushName}}{{else}}{{.JID}}{{end}} (WA)' }}" # Should the bridge create a space for each logged-in user and add bridged rooms to it? # Users who logged in before turning this on should run `!wa sync space` to create and fill the space for the first time.