identity in config to allow save from everywhere
This commit is contained in:
@ -115,7 +115,7 @@ func (id *Identity) FinalizeInvitation(ReceivedContact *meowlib.ContactCard) err
|
||||
func LoadIdentity(filename string, password string) (*Identity, error) {
|
||||
var id Identity
|
||||
GetConfig().memoryPassword = password
|
||||
GetConfig().identityFile = filename
|
||||
GetConfig().IdentityFile = filename
|
||||
indata, err := os.ReadFile(filename)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@ -135,6 +135,6 @@ func (id *Identity) Save() error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = os.WriteFile(GetConfig().identityFile, []byte(armor), 0600)
|
||||
err = os.WriteFile(GetConfig().IdentityFile, []byte(armor), 0600)
|
||||
return err
|
||||
}
|
||||
|
Reference in New Issue
Block a user