fix_: set default user status to Automatic on account creationg (#5083)
This commit is contained in:
parent
295685c1fe
commit
68bc9d39fd
|
@ -12,7 +12,9 @@ import (
|
|||
"github.com/status-im/status-go/eth-node/types"
|
||||
"github.com/status-im/status-go/multiaccounts/settings"
|
||||
"github.com/status-im/status-go/params"
|
||||
"github.com/status-im/status-go/protocol"
|
||||
"github.com/status-im/status-go/protocol/identity/alias"
|
||||
"github.com/status-im/status-go/protocol/protobuf"
|
||||
"github.com/status-im/status-go/protocol/requests"
|
||||
)
|
||||
|
||||
|
@ -100,6 +102,19 @@ func defaultSettings(generatedAccountInfo generator.GeneratedAccountInfo, derive
|
|||
|
||||
s.TestNetworksEnabled = false
|
||||
|
||||
// Default user status
|
||||
currentUserStatus, err := json.Marshal(protocol.UserStatus{
|
||||
PublicKey: chatKeyString,
|
||||
StatusType: int(protobuf.StatusUpdate_AUTOMATIC),
|
||||
Clock: 0,
|
||||
CustomText: "",
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
userRawMessage := json.RawMessage(currentUserStatus)
|
||||
s.CurrentUserStatus = &userRawMessage
|
||||
|
||||
return s, nil
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue