Add Wipe function to Identity
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
ycc
2024-03-30 22:44:59 +01:00
parent 13cfda928d
commit 54b932e9c1
2 changed files with 14 additions and 3 deletions

View File

@ -58,6 +58,14 @@ func (id *Identity) CreateFolder() error {
return nil
}
func (id *Identity) Wipe() error {
err := os.RemoveAll(filepath.Join(GetConfig().StoragePath, id.Uuid))
if err != nil {
return err
}
return nil
}
// Creates an invitation for a peer, returns the newly created peer including infos to provide a ContactCard
func (id *Identity) InvitePeer(MyName string, ContactName string, MessageServerUids []string, InvitationMessage string) (*Peer, error) {
var peer Peer