allow Update(Note) to change url, since it's now validated on edits

This commit is contained in:
Hazelnoot 2025-02-23 12:36:51 -05:00
parent a568333ecd
commit 67abc0ce19

View file

@ -94,7 +94,6 @@ export class ApNoteService {
uri: string,
actor?: MiRemoteUser,
user?: MiRemoteUser,
note?: MiNote,
): Error | null {
const expectHost = this.utilityService.extractDbHost(uri);
const apType = getApType(object);
@ -126,13 +125,6 @@ export class ApNoteService {
}
}
if (note) {
const url = this.apUtilityService.findSameAuthorityUrl(uri, object.url);
if (url && url !== note.url) {
return new IdentifiableError('d450b8a9-48e4-4dab-ae36-f4db763fda7c', `invalid Note: updated url does not match original url. updated url: ${url}, original url: ${note.url}`);
}
}
return null;
}
@ -377,7 +369,7 @@ export class ApNoteService {
const object = await resolver.resolve(value);
const entryUri = getApId(value);
const err = this.validateNote(object, entryUri, actor, user, updatedNote);
const err = this.validateNote(object, entryUri, actor, user);
if (err) {
this.logger.error(err.message, {
resolver: { history: resolver.getHistory() },