Moew weork done

This commit is contained in:
Melody Becker 2024-09-12 16:57:53 +02:00
parent 814316ab1e
commit 07d98d1ef5
10 changed files with 147 additions and 16 deletions

View file

@ -191,6 +191,7 @@ func (s *Storage) UpdateAccount(acc *Account) error {
return nil
}
// Create a new empty account for future use
func (s *Storage) NewEmptyAccount() (*Account, error) {
log.Trace().Caller().Send()
log.Debug().Msg("Creating new empty account")
@ -219,6 +220,9 @@ func (s *Storage) NewEmptyAccount() (*Account, error) {
return &acc, nil
}
// Create a new local account using the given handle
// The handle in this case is only the part before the domain (example: @bob@example.com would have a handle of bob)
// It also sets up a bunch of values that tend to be obvious for local accounts
func (s *Storage) NewLocalAccount(handle string) (*Account, error) {
log.Trace().Caller().Send()
log.Debug().Str("account-handle", handle).Msg("Creating new local account")