forked from FoundKeyGang/FoundKey
trigger side effects also when decting movedTo
This commit is contained in:
parent
4d59896cc4
commit
8f0fff5c90
1 changed files with 7 additions and 0 deletions
|
@ -22,6 +22,7 @@ import { truncate } from '@/misc/truncate.js';
|
|||
import { StatusError } from '@/misc/fetch.js';
|
||||
import { uriPersonCache } from '@/services/user-cache.js';
|
||||
import { publishInternalEvent } from '@/services/stream.js';
|
||||
import { move } from '@/services/move.js';
|
||||
import { db } from '@/db/postgre.js';
|
||||
import { fromHtml } from '@/mfm/from-html.js';
|
||||
import { Resolver } from '@/remote/activitypub/resolver.js';
|
||||
|
@ -342,6 +343,12 @@ export async function updatePerson(value: IObject | string, resolver: Resolver):
|
|||
|
||||
const person = await validateActor(object, resolver);
|
||||
|
||||
if (person.movedTo != null && exist.movedToId == null) {
|
||||
// The person was not moved before, but is now. Therefore the person has moved.
|
||||
// The move was already verified in validateActor.
|
||||
move(exist.id, person.movedTo.id);
|
||||
}
|
||||
|
||||
apLogger.info(`Updating the Person: ${person.id}`);
|
||||
|
||||
// Fetch avatar and banner image
|
||||
|
|
Loading…
Reference in a new issue