aboutsummaryrefslogtreecommitdiff
path: root/xmpp
diff options
context:
space:
mode:
authorbodqhrohro <bodqhrohro@gmail.com>2020-01-05 16:03:10 +0300
committerbodqhrohro <bodqhrohro@gmail.com>2020-01-05 16:03:10 +0300
commitb8fcac6ae24dd5e07f366741f0f282f33b18b503 (patch)
tree61f86331504dcd079f1a964d103ec299aa70f351 /xmpp
parenta435a0a556cb88fe1fcc7e3bf860b45530d895e7 (diff)
Resend chat statuses on probe presence
Diffstat (limited to 'xmpp')
-rw-r--r--xmpp/handlers.go9
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),
+ )
+ }
}
}()
}