mirror of
https://codeberg.org/yeentown/barkey.git
synced 2025-07-07 20:44:34 +00:00
register instances before creating a user
This commit is contained in:
parent
139f458c0b
commit
08834f1722
1 changed files with 3 additions and 0 deletions
|
@ -398,6 +398,9 @@ export class ApPersonService implements OnModuleInit, OnApplicationShutdown {
|
||||||
const followerscollection = await _resolver.resolveCollection(person.followers!).catch(() => { return null; });
|
const followerscollection = await _resolver.resolveCollection(person.followers!).catch(() => { return null; });
|
||||||
const followingcollection = await _resolver.resolveCollection(person.following!).catch(() => { return null; });
|
const followingcollection = await _resolver.resolveCollection(person.following!).catch(() => { return null; });
|
||||||
|
|
||||||
|
// Register the instance first, to avoid FK errors
|
||||||
|
await this.federatedInstanceService.fetchOrRegister(host);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
// Start transaction
|
// Start transaction
|
||||||
await this.db.transaction(async transactionalEntityManager => {
|
await this.db.transaction(async transactionalEntityManager => {
|
||||||
|
|
Loading…
Add table
Reference in a new issue