feat: Enhance messaging read receipts and auto-read, fix auth 401 error suppression during logout, and refine agent profile expertise

This commit is contained in:
pradeepkumar
2026-03-27 06:32:46 +05:30
parent ba87e3b091
commit 4c06d0d895
7 changed files with 77 additions and 15 deletions

View File

@@ -264,6 +264,26 @@ class ChatMessage {
bool isMine(String currentUserId) => senderId == currentUserId;
ChatMessage copyWith({MessageStatus? status, String? readAt, String? deliveredAt}) {
return ChatMessage(
id: id,
conversationId: conversationId,
senderId: senderId,
content: content,
messageType: messageType,
fileUrl: fileUrl,
fileName: fileName,
fileSize: fileSize,
mimeType: mimeType,
status: status ?? this.status,
deliveredAt: deliveredAt ?? this.deliveredAt,
readAt: readAt ?? this.readAt,
createdAt: createdAt,
updatedAt: updatedAt,
sender: sender,
);
}
factory ChatMessage.fromJson(Map<String, dynamic> json) {
return ChatMessage(
id: json['id'] as String,