trigger side effects also when decting movedTo
All checks were successful
ci/woodpecker/push/lint-backend Pipeline was successful
ci/woodpecker/push/lint-client Pipeline was successful
ci/woodpecker/push/lint-foundkey-js Pipeline was successful
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/push/lint-sw Pipeline was successful
ci/woodpecker/pr/build Pipeline was successful
ci/woodpecker/pr/lint-client Pipeline was successful
ci/woodpecker/pr/lint-backend Pipeline was successful
ci/woodpecker/pr/lint-foundkey-js Pipeline was successful
ci/woodpecker/pr/lint-sw Pipeline was successful
ci/woodpecker/pr/test Pipeline was successful
ci/woodpecker/push/test Pipeline was successful
All checks were successful
ci/woodpecker/push/lint-backend Pipeline was successful
ci/woodpecker/push/lint-client Pipeline was successful
ci/woodpecker/push/lint-foundkey-js Pipeline was successful
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/push/lint-sw Pipeline was successful
ci/woodpecker/pr/build Pipeline was successful
ci/woodpecker/pr/lint-client Pipeline was successful
ci/woodpecker/pr/lint-backend Pipeline was successful
ci/woodpecker/pr/lint-foundkey-js Pipeline was successful
ci/woodpecker/pr/lint-sw Pipeline was successful
ci/woodpecker/pr/test Pipeline was successful
ci/woodpecker/push/test Pipeline was successful
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