Respond correctly to disco queries about account JIDs
This commit is contained in:
parent
70841a2bea
commit
3f96664ef3
|
@ -319,10 +319,16 @@ func handleGetDiscoInfo(s xmpp.Sender, iq *stanza.IQ) {
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Errorf("Failed to create answer IQ: %v", err)
|
log.Errorf("Failed to create answer IQ: %v", err)
|
||||||
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
disco := answer.DiscoInfo()
|
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
|
answer.Payload = disco
|
||||||
|
|
||||||
log.Debugf("%#v", answer)
|
log.Debugf("%#v", answer)
|
||||||
|
|
Loading…
Reference in a new issue