mirror of https://github.com/usbharu/Hideout.git
fix: ノートの重複判定を修正
This commit is contained in:
parent
6b7016ddf6
commit
9fa26375d9
|
@ -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) {
|
||||||
|
|
Loading…
Reference in New Issue