aboutsummaryrefslogtreecommitdiff
path: root/xmpp/handlers.go
diff options
context:
space:
mode:
Diffstat (limited to 'xmpp/handlers.go')
-rw-r--r--xmpp/handlers.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/xmpp/handlers.go b/xmpp/handlers.go
index c5ec029..fd1afad 100644
--- a/xmpp/handlers.go
+++ b/xmpp/handlers.go
@@ -481,7 +481,7 @@ func makeVCardPayload(typ byte, id string, info telegram.VCardInfo, session *tel
vcard.Photo.Type.Text = "image/jpeg"
vcard.Photo.Binval.Text = base64Photo
}
- vcard.Nickname.Text = info.Nickname
+ vcard.Nickname.Text = strings.Join(info.Nicknames, ",")
vcard.N.Given.Text = info.Given
vcard.N.Family.Text = info.Family
vcard.Tel.Number.Text = info.Tel
@@ -512,13 +512,13 @@ func makeVCardPayload(typ byte, id string, info telegram.VCardInfo, session *tel
},
})
}
- if info.Nickname != "" {
+ for _, nickname := range info.Nicknames {
nodes = append(nodes, stanza.Node{
XMLName: xml.Name{Local: "nickname"},
Nodes: []stanza.Node{
stanza.Node{
XMLName: xml.Name{Local: "text"},
- Content: info.Nickname,
+ Content: nickname,
},
},
}, stanza.Node{
@@ -526,7 +526,7 @@ func makeVCardPayload(typ byte, id string, info telegram.VCardInfo, session *tel
Nodes: []stanza.Node{
stanza.Node{
XMLName: xml.Name{Local: "uri"},
- Content: "https://t.me/" + info.Nickname,
+ Content: "https://t.me/" + nickname,
},
},
})