From 44bb623e7a7486a0cdd13fd67b2aaca2ddba20ce Mon Sep 17 00:00:00 2001 From: davralin Date: Mon, 6 Apr 2020 00:05:39 +0200 Subject: [PATCH] Document how to use multiple if's in displayname_template, Closes #162 --- example-config.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/example-config.yaml b/example-config.yaml index b3eafe5..061f433 100644 --- a/example-config.yaml +++ b/example-config.yaml @@ -60,6 +60,8 @@ bridge: # The following variables are also available, but will cause problems on multi-user instances: # {{.Name}} - display name from contact list # {{.Short}} - short display name from contact list + # To use multiple if's, you need to use: {{else if .Name}}, for example: + # "{{if .Notify}}{{.Notify}}{{else if .Name}}{{.Name}}{{else}}{{.Jid}}{{end}} (WA)" displayname_template: "{{if .Notify}}{{.Notify}}{{else}}{{.Jid}}{{end}} (WA)" # Localpart template for per-user room grouping community IDs. # On startup, the bridge will try to create these communities, add all of the specific user's