Fix/improve minor things

This commit is contained in:
Tulir Asokan
2018-08-26 22:50:28 +03:00
parent a6ebc50f6d
commit 65f077c645
4 changed files with 13 additions and 2 deletions

View File

@ -66,6 +66,9 @@ type UsernameTemplateArgs struct {
func (bc BridgeConfig) FormatDisplayname(contact whatsapp.Contact) string {
var buf bytes.Buffer
if index := strings.IndexRune(contact.Jid, '@'); index > 0 {
contact.Jid = "+" + contact.Jid[:index]
}
bc.displaynameTemplate.Execute(&buf, contact)
return buf.String()
}