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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user