diff --git a/pkg/connector/config.go b/pkg/connector/config.go index 0e2c03e4..0e29c330 100644 --- a/pkg/connector/config.go +++ b/pkg/connector/config.go @@ -121,8 +121,13 @@ func upgradeConfig(helper up.Helper) { type DisplaynameParams struct { types.ContactInfo Phone string - // Deprecated form of Phone - JID string + + // Deprecated legacy fields + JID string + Notify string + VName string + Name string + Short string } func (c *Config) FormatDisplayname(jid types.JID, contact types.ContactInfo) string { @@ -130,7 +135,13 @@ func (c *Config) FormatDisplayname(jid types.JID, contact types.ContactInfo) str err := c.displaynameTemplate.Execute(&nameBuf, &DisplaynameParams{ ContactInfo: contact, Phone: "+" + jid.User, - JID: "+" + jid.User, + + // Deprecated legacy fields + JID: "+" + jid.User, + Notify: contact.PushName, + VName: contact.BusinessName, + Name: contact.FullName, + Short: contact.FirstName, }) if err != nil { panic(err)