mirror of
https://github.com/permissionlesstech/bitchat.git
synced 2026-07-25 01:05:19 +00:00
Harden PTT audio and the 1.7.1 release (#1423)
Centralize PTT and voice audio-session ownership, harden courier/bridge/outbox delivery and recovery, correct location and delivery-state races, add privacy/release metadata, and ship reproducible universal Arti slices with Release CI coverage. Validated by the full iOS suite, repeated audio/fragment/performance regressions, BitFoundation tests, strict lint and dead-code analysis, universal iOS Release builds, and iOS/macOS archives.
This commit is contained in:
@@ -312,6 +312,30 @@ struct MessageDeduplicationServiceTests {
|
||||
#expect(service.contentTimestamp(forKey: key) == now)
|
||||
}
|
||||
|
||||
@Test func forgetContent_allowsAuthenticatedReplacementThroughNextBatch() {
|
||||
let service = MessageDeduplicationService(contentCapacity: 100, nostrEventCapacity: 100)
|
||||
let content = "bridge alias payload"
|
||||
let timestamp = Date()
|
||||
service.recordContent(content, timestamp: timestamp)
|
||||
|
||||
service.forgetContent(content, ifRecordedAt: timestamp)
|
||||
|
||||
#expect(service.contentTimestamp(for: content) == nil)
|
||||
}
|
||||
|
||||
@Test func forgetContent_doesNotEraseNewerSameContentMarker() {
|
||||
let service = MessageDeduplicationService(contentCapacity: 100, nostrEventCapacity: 100)
|
||||
let content = "repeated payload"
|
||||
let old = Date(timeIntervalSince1970: 1_000)
|
||||
let newer = Date(timeIntervalSince1970: 2_000)
|
||||
service.recordContent(content, timestamp: old)
|
||||
service.recordContent(content, timestamp: newer)
|
||||
|
||||
service.forgetContent(content, ifRecordedAt: old)
|
||||
|
||||
#expect(service.contentTimestamp(for: content) == newer)
|
||||
}
|
||||
|
||||
@Test func normalizedContentKey_consistentWithNormalizer() {
|
||||
let service = MessageDeduplicationService(contentCapacity: 100, nostrEventCapacity: 100)
|
||||
let content = "Hello World"
|
||||
|
||||
Reference in New Issue
Block a user