fix: ノートの重複判定を修正

This commit is contained in:
usbharu 2023-08-14 20:45:48 +09:00
parent 6b7016ddf6
commit 9fa26375d9
1 changed files with 5 additions and 1 deletions

View File

@ -119,8 +119,12 @@ class APNoteServiceImpl(
targetActor: String?, targetActor: String?,
url: String url: String
): Note { ): Note {
if (note.id == null) {
return internalNote(note, targetActor, url)
}
val findByApId = try { val findByApId = try {
postQueryService.findByApId(url) postQueryService.findByApId(note.id!!)
} catch (_: NoSuchElementException) { } catch (_: NoSuchElementException) {
return internalNote(note, targetActor, url) return internalNote(note, targetActor, url)
} catch (_: IllegalArgumentException) { } catch (_: IllegalArgumentException) {