diff options
author | bodqhrohro <bodqhrohro@gmail.com> | 2020-01-05 16:03:10 +0300 |
---|---|---|
committer | bodqhrohro <bodqhrohro@gmail.com> | 2020-01-05 16:03:10 +0300 |
commit | b8fcac6ae24dd5e07f366741f0f282f33b18b503 (patch) | |
tree | 61f86331504dcd079f1a964d103ec299aa70f351 /xmpp/handlers.go | |
parent | a435a0a556cb88fe1fcc7e3bf860b45530d895e7 (diff) |
Resend chat statuses on probe presence
Diffstat (limited to 'xmpp/handlers.go')
-rw-r--r-- | xmpp/handlers.go | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/xmpp/handlers.go b/xmpp/handlers.go index 2addd7b..8778423 100644 --- a/xmpp/handlers.go +++ b/xmpp/handlers.go @@ -176,6 +176,15 @@ func handlePresence(s xmpp.Sender, p stanza.Presence) { err = session.Connect() if err != nil { log.Error(errors.Wrap(err, "TDlib connection failure")) + } else { + for status := range session.StatusesRange() { + go session.ProcessStatusUpdate( + status.ID, + status.XMPP, + status.Description, + gateway.SPImmed(false), + ) + } } }() } |