mautrix / whatsapp

A Matrix-WhatsApp puppeting bridge
https://maunium.net/go/mautrix-whatsapp
GNU Affero General Public License v3.0
1.29k stars 175 forks source link

PushName change in whatsapp takes precedence over current name #561

Open Ultimator14 opened 2 years ago

Ultimator14 commented 2 years ago

I'm using the following displayname_template, which should prefer FullName over PushName:

displayname_template: '{{if .FullName}}{{.FullName}}{{else if .PushName}}{{.PushName}}{{else if .BusinessName}}{{.BusinessName}}{{else}}{{.Jid}}{{end}} (WA)'

When creating a new portal, this works as expected. But when a contacts changes the PushName in whatsapp, this name is taken instead. I tried restarting the bridge and syncing contacts multiple times but it has no effect.

As a workaround, I can change the contact name to something else, wait until the bridge changed it and then change it back. This makes the FullName take precedence over the PushName again.

From my POV, sync contacts should take care of this and follow the priority set in displayname_template