Try to set online status.
This commit is contained in:
parent
1fc50a967d
commit
a66471331e
conn/xmpp
|
@ -69,6 +69,7 @@ func runClient(cfg *xmpp.Config) {
|
|||
logError(err)
|
||||
return
|
||||
}
|
||||
SetOnline(cfg, client)
|
||||
|
||||
// If you pass the client to a connection manager, it will handle the reconnect policy
|
||||
// for you automatically.
|
||||
|
@ -76,3 +77,11 @@ func runClient(cfg *xmpp.Config) {
|
|||
|
||||
log.Print(cm.Run())
|
||||
}
|
||||
|
||||
func SetOnline(cfg *xmpp.Config, client *xmpp.Client) {
|
||||
pkt := stanza.NewPresence(stanza.Attrs{
|
||||
From: cfg.Jid,
|
||||
})
|
||||
|
||||
client.Send(pkt)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue