mirror of
https://dev.narayana.im/narayana/telegabber.git
synced 2026-08-05 12:17:06 +00:00
Support vCards for occupant JIDs
This commit is contained in:
parent
ca75d38169
commit
b2c4ade6b9
1 changed files with 13 additions and 1 deletions
|
|
@ -761,12 +761,24 @@ func handleGetVcardIq(s xmpp.Sender, iq *stanza.IQ, typ byte) {
|
|||
return
|
||||
}
|
||||
|
||||
toID, toOk, _ := toToID(iq.To)
|
||||
toID, toOk, isGroup := toToID(iq.To)
|
||||
if !toOk {
|
||||
log.Error("Invalid IQ to")
|
||||
return
|
||||
}
|
||||
|
||||
if isGroup {
|
||||
toJid, err := stanza.NewJid(iq.To)
|
||||
if err != nil {
|
||||
log.Error("Invalid to JID!")
|
||||
return
|
||||
}
|
||||
|
||||
if toJid.Resource != "" {
|
||||
toID = session.GetMUCMemberIdByNickname(toID, toJid.Resource)
|
||||
}
|
||||
}
|
||||
|
||||
info, err := session.GetVcardInfo(toID)
|
||||
if err != nil {
|
||||
log.Error(err)
|
||||
|
|
|
|||
Loading…
Reference in a new issue