Sync puppet info on push name setting app data

This commit is contained in:
Tulir Asokan 2023-04-14 13:45:45 +03:00
parent d2054a39b2
commit 43ed49d4fe

View file

@ -801,6 +801,11 @@ func (user *User) HandleEvent(event interface{}) {
if err != nil { if err != nil {
user.log.Warnln("Failed to send presence after push name update:", err) user.log.Warnln("Failed to send presence after push name update:", err)
} }
_, _, err = user.Client.Store.Contacts.PutPushName(user.JID.ToNonAD(), v.Action.GetName())
if err != nil {
user.log.Warnln("Failed to update push name in store:", err)
}
go user.syncPuppet(user.JID.ToNonAD(), "push name setting")
case *events.PairSuccess: case *events.PairSuccess:
user.PhoneLastSeen = time.Now() user.PhoneLastSeen = time.Now()
user.Session = user.Client.Store user.Session = user.Client.Store