Advertise gateway first, MUC next
This commit is contained in:
parent
63521b8f90
commit
7eaf28ad7c
|
@ -340,6 +340,10 @@ func handleGetDisco(dt discoType, s xmpp.Sender, iq *stanza.IQ) {
|
|||
if dt == discoTypeInfo {
|
||||
disco := answer.DiscoInfo()
|
||||
toID, toOk := toToID(iq.To)
|
||||
if !toOk {
|
||||
disco.AddIdentity("Telegram Gateway", "gateway", "telegram")
|
||||
}
|
||||
|
||||
var isMuc bool
|
||||
bare, _, fromOk := splitFrom(iq.From)
|
||||
if fromOk {
|
||||
|
@ -386,13 +390,9 @@ func handleGetDisco(dt discoType, s xmpp.Sender, iq *stanza.IQ) {
|
|||
}
|
||||
}
|
||||
}
|
||||
if toOk {
|
||||
if !isMuc {
|
||||
if toOk && !isMuc {
|
||||
disco.AddIdentity("", "account", "registered")
|
||||
}
|
||||
} else {
|
||||
disco.AddIdentity("Telegram Gateway", "gateway", "telegram")
|
||||
}
|
||||
answer.Payload = disco
|
||||
} else if dt == discoTypeItems {
|
||||
disco := answer.DiscoItems()
|
||||
|
|
Loading…
Reference in a new issue