Эх сурвалжийг харах

Document how to use multiple if's in displayname_template, Closes #162

davralin 5 жил өмнө
parent
commit
44bb623e7a

+ 2 - 0
example-config.yaml

@@ -60,6 +60,8 @@ bridge:
     # The following variables are also available, but will cause problems on multi-user instances:
     # The following variables are also available, but will cause problems on multi-user instances:
     # {{.Name}}   - display name from contact list
     # {{.Name}}   - display name from contact list
     # {{.Short}}  - short 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)"
     displayname_template: "{{if .Notify}}{{.Notify}}{{else}}{{.Jid}}{{end}} (WA)"
     # Localpart template for per-user room grouping community IDs.
     # 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
     # On startup, the bridge will try to create these communities, add all of the specific user's