[codex] Refactor BLE transport event handling (#1266)

* Refactor BLE transport event handling

* Make image output paths unique

* Keep queued Nostr read receipts alive

* Allow self-authored RSR ingress replies

---------

Co-authored-by: jack <jackjackbits@users.noreply.github.com>
This commit is contained in:
jack
2026-05-31 13:58:27 +02:00
committed by GitHub
co-authored by jack
parent 3be8fbf1c4
commit ab0da61533
19 changed files with 575 additions and 152 deletions
@@ -64,4 +64,19 @@ struct ImageUtilsTests {
#expect(data.starts(with: Data([0xFF, 0xD8])))
#expect(data.count > 0)
}
@Test
func processImage_usesUniqueOutputURLs() throws {
let image = makePlatformImage(size: CGSize(width: 64, height: 64))
let firstURL = try ImageUtils.processImage(image, maxDimension: 64)
let secondURL = try ImageUtils.processImage(image, maxDimension: 64)
defer {
try? FileManager.default.removeItem(at: firstURL)
try? FileManager.default.removeItem(at: secondURL)
}
#expect(firstURL != secondURL)
#expect(FileManager.default.fileExists(atPath: firstURL.path))
#expect(FileManager.default.fileExists(atPath: secondURL.path))
}
}