mirror of
https://github.com/permissionlesstech/bitchat.git
synced 2026-07-25 13:05:18 +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:
@@ -760,6 +760,40 @@ struct ChatViewModelRateLimitingTests {
|
||||
|
||||
struct ChatViewModelPublicConversationTests {
|
||||
|
||||
@Test @MainActor
|
||||
func bridgeAliasReplacementDoesNotContentDedupAwayAuthenticatedRadioRow() {
|
||||
let (viewModel, _) = makeTestableViewModel()
|
||||
let content = "same bridge and radio payload"
|
||||
let timestamp = Date()
|
||||
let bridgeMessage = BitchatMessage(
|
||||
id: "bridge-event-id",
|
||||
sender: "remote#beef",
|
||||
content: content,
|
||||
timestamp: timestamp,
|
||||
isRelay: false,
|
||||
senderPeerID: PeerID(bridge: String(repeating: "a", count: 64)),
|
||||
isBridged: true
|
||||
)
|
||||
viewModel.handlePublicMessage(bridgeMessage)
|
||||
viewModel.publicMessagePipeline.flushIfNeeded()
|
||||
#expect(viewModel.publicConversationContainsMessage(withID: bridgeMessage.id, in: .mesh))
|
||||
|
||||
viewModel.removeBridgeInjectedPublicMessage(withID: bridgeMessage.id)
|
||||
let radioMessage = BitchatMessage(
|
||||
id: "radio-stable-id",
|
||||
sender: "remote",
|
||||
content: content,
|
||||
timestamp: timestamp,
|
||||
isRelay: false,
|
||||
senderPeerID: PeerID(str: "1122334455667788")
|
||||
)
|
||||
viewModel.handlePublicMessage(radioMessage)
|
||||
viewModel.publicMessagePipeline.flushIfNeeded()
|
||||
|
||||
#expect(!viewModel.publicConversationContainsMessage(withID: bridgeMessage.id, in: .mesh))
|
||||
#expect(viewModel.publicConversationContainsMessage(withID: radioMessage.id, in: .mesh))
|
||||
}
|
||||
|
||||
@Test @MainActor
|
||||
func addPublicSystemMessage_persistsAcrossTimelineRefresh() async {
|
||||
let (viewModel, _) = makeTestableViewModel()
|
||||
|
||||
Reference in New Issue
Block a user