mirror of
				https://codeberg.org/yeentown/barkey.git
				synced 2025-10-31 13:34:12 +00:00 
			
		
		
		
	allow Update(Note) to change url, since it's now validated on edits
				
					
				
			This commit is contained in:
		
							parent
							
								
									a568333ecd
								
							
						
					
					
						commit
						67abc0ce19
					
				
					 1 changed files with 1 additions and 9 deletions
				
			
		|  | @ -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() }, | ||||
|  |  | |||
		Loading…
	
	Add table
		
		Reference in a new issue