start with ap

This commit is contained in:
tsmethurst 2021-04-22 18:51:49 +02:00
commit b0819c1a63
6 changed files with 117 additions and 62 deletions

View file

@ -456,21 +456,21 @@ func (ps *postgresService) NewSignup(username string, reason string, requireAppr
return nil, err
}
uris := util.GenerateURIs(username, ps.config.Protocol, ps.config.Host)
newAccountURIs := util.GenerateURIsForAccount(username, ps.config.Protocol, ps.config.Host)
a := &gtsmodel.Account{
Username: username,
DisplayName: username,
Reason: reason,
URL: uris.UserURL,
URL: newAccountURIs.UserURL,
PrivateKey: key,
PublicKey: &key.PublicKey,
ActorType: gtsmodel.ActivityStreamsPerson,
URI: uris.UserURI,
InboxURL: uris.InboxURI,
OutboxURL: uris.OutboxURI,
FollowersURL: uris.FollowersURI,
FeaturedCollectionURL: uris.CollectionURI,
URI: newAccountURIs.UserURI,
InboxURL: newAccountURIs.InboxURI,
OutboxURL: newAccountURIs.OutboxURI,
FollowersURL: newAccountURIs.FollowersURI,
FeaturedCollectionURL: newAccountURIs.CollectionURI,
}
if _, err = ps.conn.Model(a).Insert(); err != nil {
return nil, err