Исправление работы доставки, прочтения сообщений
This commit is contained in:
@@ -153,7 +153,8 @@ class ChatRepositoryImpl @Inject constructor(
|
||||
Log.d(TAG, "Cached ${entities.size} messages")
|
||||
}
|
||||
|
||||
messages.map { msg -> msg.toDomain(currentUserId, baseUrl).copy(isRead = true) }
|
||||
// Используем корректную логику из маппера (readBy), а не принудительно true
|
||||
messages.map { msg -> msg.toDomain(currentUserId, baseUrl) }
|
||||
} catch (e: Exception) {
|
||||
Log.e(TAG, "Fetch messages failed", e)
|
||||
emptyList()
|
||||
@@ -186,7 +187,7 @@ class ChatRepositoryImpl @Inject constructor(
|
||||
mediaType = type.uppercase(),
|
||||
mediaJson = "[]",
|
||||
reactionsJson = "{}",
|
||||
isRead = true, replyToId = replyToId,
|
||||
isRead = false, replyToId = replyToId,
|
||||
syncStatus = SyncStatus.SYNCING,
|
||||
isDeletedLocally = false, isEditedLocally = false,
|
||||
editedContent = null, lastUpdated = currentTime
|
||||
@@ -243,7 +244,7 @@ class ChatRepositoryImpl @Inject constructor(
|
||||
else -> MediaType.TEXT
|
||||
},
|
||||
reactions = emptyMap(),
|
||||
isRead = true,
|
||||
isRead = false,
|
||||
isPinned = false,
|
||||
isForwarded = false,
|
||||
forwardedFromName = null,
|
||||
|
||||
Reference in New Issue
Block a user