Respond correctly to disco queries about account JIDs

calls
Bohdan Horbeshko 2 years ago
parent 70841a2bea
commit 3f96664ef3

@ -319,10 +319,16 @@ func handleGetDiscoInfo(s xmpp.Sender, iq *stanza.IQ) {
})
if err != nil {
log.Errorf("Failed to create answer IQ: %v", err)
return
}
disco := answer.DiscoInfo()
disco.AddIdentity("Telegram Gateway", "gateway", "telegram")
_, ok := toToID(iq.To)
if ok {
disco.AddIdentity("", "account", "registered")
} else {
disco.AddIdentity("Telegram Gateway", "gateway", "telegram")
}
answer.Payload = disco
log.Debugf("%#v", answer)

Loading…
Cancel
Save