continue process after SaveSyncDisplayName
get `ErrNewClockOlderTha… (#3952)
* continue process after `SaveSyncDisplayName` get `ErrNewClockOlderThanCurrent` * bump version
This commit is contained in:
parent
abe43a83ae
commit
3837428384
2 changed files with 11 additions and 7 deletions
2
VERSION
2
VERSION
|
@ -1 +1 @@
|
|||
0.165.1
|
||||
0.165.2
|
||||
|
|
|
@ -3,16 +3,15 @@ package protocol
|
|||
import (
|
||||
"database/sql"
|
||||
|
||||
ensservice "github.com/status-im/status-go/services/ens"
|
||||
|
||||
"github.com/status-im/status-go/protocol/identity"
|
||||
v1protocol "github.com/status-im/status-go/protocol/v1"
|
||||
|
||||
"go.uber.org/zap"
|
||||
|
||||
"github.com/status-im/status-go/images"
|
||||
"github.com/status-im/status-go/multiaccounts/errors"
|
||||
"github.com/status-im/status-go/protocol/identity"
|
||||
"github.com/status-im/status-go/protocol/protobuf"
|
||||
v1protocol "github.com/status-im/status-go/protocol/v1"
|
||||
"github.com/status-im/status-go/protocol/wakusync"
|
||||
ensservice "github.com/status-im/status-go/services/ens"
|
||||
)
|
||||
|
||||
const (
|
||||
|
@ -106,12 +105,17 @@ func (m *Messenger) handleBackedUpProfile(message *protobuf.BackedUpProfile, bac
|
|||
}
|
||||
|
||||
err := m.SaveSyncDisplayName(message.DisplayName, message.DisplayNameClock)
|
||||
if err != nil {
|
||||
if err != nil && err != errors.ErrNewClockOlderThanCurrent {
|
||||
return err
|
||||
}
|
||||
|
||||
response.SetDisplayName(message.DisplayName)
|
||||
|
||||
// if we already have a newer clock, then we don't need to update the display name
|
||||
if err == errors.ErrNewClockOlderThanCurrent {
|
||||
response.SetDisplayName(m.account.Name)
|
||||
}
|
||||
|
||||
syncWithBackedUpImages := false
|
||||
dbImages, err := m.multiAccounts.GetIdentityImages(message.KeyUid)
|
||||
if err != nil {
|
||||
|
|
Loading…
Reference in a new issue