Save session to db when changed

This commit is contained in:
Tulir Asokan 2021-02-19 20:39:50 +02:00
parent 7bd47fabb2
commit 15b4350622

View file

@ -1214,6 +1214,7 @@ func (user *User) HandleConnInfo(info whatsapp.ConnInfo) {
user.Session.ClientToken = info.ClientToken user.Session.ClientToken = info.ClientToken
user.Session.ServerToken = info.ServerToken user.Session.ServerToken = info.ServerToken
user.Session.Wid = info.WID user.Session.Wid = info.WID
user.Update()
} }
if len(info.PushName) > 0 { if len(info.PushName) > 0 {
user.pushName = info.PushName user.pushName = info.PushName