fix: Respect ignore DUPLICATE_URIS flag
This commit is contained in:
parent
eb6b0877d8
commit
a1feeb495a
|
@ -1247,6 +1247,9 @@ sealed interface DFilter {
|
||||||
val cipherUrlDuplicateCheck = directDI.instance<CipherUrlDuplicateCheck>()
|
val cipherUrlDuplicateCheck = directDI.instance<CipherUrlDuplicateCheck>()
|
||||||
ciphers
|
ciphers
|
||||||
.filter { cipher ->
|
.filter { cipher ->
|
||||||
|
if (shouldIgnore(cipher)) {
|
||||||
|
return@filter false
|
||||||
|
}
|
||||||
val uris = cipher.uris
|
val uris = cipher.uris
|
||||||
if (uris.isEmpty()) {
|
if (uris.isEmpty()) {
|
||||||
return@filter false
|
return@filter false
|
||||||
|
@ -1273,6 +1276,10 @@ sealed interface DFilter {
|
||||||
false
|
false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private fun shouldIgnore(
|
||||||
|
cipher: DSecret,
|
||||||
|
) = cipher.ignores(DWatchtowerAlertType.DUPLICATE_URIS)
|
||||||
}
|
}
|
||||||
|
|
||||||
@Serializable
|
@Serializable
|
||||||
|
|
Loading…
Reference in New Issue