-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error when changing Matrix WhatsApp displayname_template #2962
Comments
You need to use Example: |
Thank you @spantaleev I changed mine to this and it works now: Now I have the next question, how to format it with "if" statements? Because no I have contacts with an empty name f.E. in WhatsApp Groups.
|
Jinja is what we use for templating the YAML files. Using Later on, it's a problem of configuring the You can try going to the mautrix-whatsapp repository or #whatsapp:maunium.net Matrix room for assistance with this. Nevertheless, I'll try to point you in the right direction. These |
Thank you @spantaleev With the tips from here and from them I got following solution working:
needs to enclosed by {% raw %} and {% endraw %} :
|
Describe the bug
I want to have the address book name from my contacts in WhatsApp. I'm the only user at my matrix server. Tried many versions, nothing seems to be correct.
To Reproduce
I tried to change the matrix_mautrix_whatsapp_configuration_yaml in the section displayname_template and always get different errors when running the Ansible playbook.
displayname_template: "{{or .FullName .BusinessName .Push
Name .JID}} (WA)"
-> when I run the Ansible script it says
Then I only used .FullName:
displayname_template: "{{.FullName}} -W"
and got this Error message:
Then I tried
displayname_template: "{{ '{{.FullName}}' }}" and got also an Error:
Even if I try the standard from the example in Ansible WhatsApp (displayname_template: "{{ '{{if .BusinessName}}{{.BusinessN
ame}}{{else if .PushName}}{{.PushName}}{{else}}{{.JID}}{{end}}
(WA)' }}"),
it doesn't work:
Seems Syntax related but I have no clue 😓
Expected behavior
Run the Ansible playbook and give me address book names.
Matrix Server:
Ansible:
The text was updated successfully, but these errors were encountered: