storage start and identity in shared config
This commit is contained in:
@ -32,6 +32,7 @@ func CreateIdentity(nickname string) *Identity {
|
||||
var id Identity
|
||||
id.Nickname = nickname
|
||||
id.RootKp = meowlib.NewKeyPair()
|
||||
GetConfig().me = &id
|
||||
return &id
|
||||
}
|
||||
|
||||
@ -124,6 +125,7 @@ func LoadIdentity(filename string, password string) (*Identity, error) {
|
||||
return nil, err
|
||||
}
|
||||
err = json.Unmarshal([]byte(pass), &id)
|
||||
GetConfig().me = &id
|
||||
return &id, err
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user