mirror of
https://github.com/permissionlesstech/bitchat.git
synced 2026-07-25 19:45:22 +00:00
Fix message display and add voice note debugging
- Fix escaped backslashes in timestamp and sender name display - Add comprehensive logging for voice note transmission pipeline - Add peripheral write completion logging - Track broadcast success/failure for central updates - Log audio recorder creation and preparation steps - Better diagnostics for troubleshooting voice note issues
This commit is contained in:
@@ -631,6 +631,8 @@ extension ChatViewModel: BitchatDelegate {
|
||||
}
|
||||
|
||||
func sendVoiceNote(_ audioData: Data, duration: TimeInterval) {
|
||||
print("[VIEWMODEL] sendVoiceNote called with audio data: \(audioData.count) bytes, duration: \(duration)s")
|
||||
|
||||
let message = BitchatMessage(
|
||||
sender: nickname,
|
||||
content: "🎤 \(String(format: "%.1f", duration))s",
|
||||
@@ -642,6 +644,8 @@ extension ChatViewModel: BitchatDelegate {
|
||||
)
|
||||
messages.append(message)
|
||||
|
||||
print("[VIEWMODEL] Added voice note to local messages, sending via mesh...")
|
||||
|
||||
// Send via mesh
|
||||
meshService.sendVoiceNote(audioData, duration: duration)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user