aboutsummaryrefslogtreecommitdiff
path: root/xmpp
diff options
context:
space:
mode:
Diffstat (limited to 'xmpp')
-rw-r--r--xmpp/handlers.go8
1 files changed, 7 insertions, 1 deletions
diff --git a/xmpp/handlers.go b/xmpp/handlers.go
index d68838b..4f048fb 100644
--- a/xmpp/handlers.go
+++ b/xmpp/handlers.go
@@ -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)