diff options
author | bodqhrohro <bodqhrohro@gmail.com> | 2019-11-19 23:25:14 +0300 |
---|---|---|
committer | bodqhrohro <bodqhrohro@gmail.com> | 2019-11-19 23:25:14 +0300 |
commit | f0c0d0ba94c923ca06b49211c70db47616e5a8e1 (patch) | |
tree | 23c097b6cb8249d4f978f7b22bd1b9877b0a5bba /xmpp/handlers.go | |
parent | a09817976ee5cdb7d1bca25c80cdef3d1b7867f7 (diff) |
Save sessions on exit
Diffstat (limited to 'xmpp/handlers.go')
-rw-r--r-- | xmpp/handlers.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/xmpp/handlers.go b/xmpp/handlers.go index 3709443..70f985d 100644 --- a/xmpp/handlers.go +++ b/xmpp/handlers.go @@ -3,6 +3,8 @@ package xmpp import ( "github.com/pkg/errors" + "dev.narayana.im/narayana/telegabber/persistence" + log "github.com/sirupsen/logrus" "gosrc.io/xmpp" "gosrc.io/xmpp/stanza" @@ -88,7 +90,7 @@ func handlePresence(s xmpp.Sender, p stanza.Presence) { return } bareFromJid := fromJid.Bare() - session, ok := getTelegramInstance(bareFromJid, nil) + session, ok := getTelegramInstance(bareFromJid, &persistence.Session{}) if !ok { return } |