Add read receipts for private messages

- Added ReadReceipt structure and .readReceipt message type
- Added .read delivery status with blue checkmarks in UI
- Send read receipts when viewing a private chat
- Send read receipts immediately for new messages if chat is open
- Update message status from delivered to read when receipt received
This commit is contained in:
jack
2025-07-06 21:49:56 +02:00
parent 2e56245a7e
commit e2b0632879
4 changed files with 143 additions and 0 deletions
+10
View File
@@ -1105,6 +1105,16 @@ struct DeliveryStatusView: View {
.foregroundColor(textColor.opacity(0.8))
.help("Delivered to \(nickname)")
case .read(let nickname, _):
HStack(spacing: -2) {
Image(systemName: "checkmark")
.font(.system(size: 10))
Image(systemName: "checkmark")
.font(.system(size: 10))
}
.foregroundColor(Color.blue)
.help("Read by \(nickname)")
case .failed(let reason):
Image(systemName: "exclamationmark.triangle")
.font(.system(size: 10))