|
|
@ -340,6 +340,10 @@ func handleGetDisco(dt discoType, s xmpp.Sender, iq *stanza.IQ) {
|
|
|
|
if dt == discoTypeInfo {
|
|
|
|
if dt == discoTypeInfo {
|
|
|
|
disco := answer.DiscoInfo()
|
|
|
|
disco := answer.DiscoInfo()
|
|
|
|
toID, toOk := toToID(iq.To)
|
|
|
|
toID, toOk := toToID(iq.To)
|
|
|
|
|
|
|
|
if !toOk {
|
|
|
|
|
|
|
|
disco.AddIdentity("Telegram Gateway", "gateway", "telegram")
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
var isMuc bool
|
|
|
|
var isMuc bool
|
|
|
|
bare, _, fromOk := splitFrom(iq.From)
|
|
|
|
bare, _, fromOk := splitFrom(iq.From)
|
|
|
|
if fromOk {
|
|
|
|
if fromOk {
|
|
|
@ -386,12 +390,8 @@ func handleGetDisco(dt discoType, s xmpp.Sender, iq *stanza.IQ) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if toOk {
|
|
|
|
if toOk && !isMuc {
|
|
|
|
if !isMuc {
|
|
|
|
disco.AddIdentity("", "account", "registered")
|
|
|
|
disco.AddIdentity("", "account", "registered")
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
disco.AddIdentity("Telegram Gateway", "gateway", "telegram")
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
answer.Payload = disco
|
|
|
|
answer.Payload = disco
|
|
|
|
} else if dt == discoTypeItems {
|
|
|
|
} else if dt == discoTypeItems {
|
|
|
|