Browse Source

Advertise gateway first, MUC next

muc
Bohdan Horbeshko 7 months ago
parent
commit
7eaf28ad7c
1 changed files with 6 additions and 6 deletions
  1. +6
    -6
      xmpp/handlers.go

+ 6
- 6
xmpp/handlers.go View File

@ -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,12 +390,8 @@ func handleGetDisco(dt discoType, s xmpp.Sender, iq *stanza.IQ) {
}
}
}
if toOk {
if !isMuc {
disco.AddIdentity("", "account", "registered")
}
} else {
disco.AddIdentity("Telegram Gateway", "gateway", "telegram")
if toOk && !isMuc {
disco.AddIdentity("", "account", "registered")
}
answer.Payload = disco
} else if dt == discoTypeItems {


Loading…
Cancel
Save