android: add channel role-based send permissions
Some checks failed
CI / test (push) Failing after 2m18s

This commit is contained in:
Codex
2026-03-09 12:56:21 +03:00
parent 5760a0cb3f
commit 37396f4da5
18 changed files with 130 additions and 5 deletions

View File

@@ -88,6 +88,7 @@ class ChatDaoTest {
lastMessageText = "hi",
lastMessageType = "text",
lastMessageCreatedAt = "2026-03-08T10:00:00Z",
myRole = "member",
updatedSortAt = "2026-03-08T10:00:00Z",
)
}

View File

@@ -49,6 +49,7 @@ class NetworkChatRepositoryTest {
lastMessageText = "Cached message",
lastMessageType = "text",
lastMessageCreatedAt = "2026-03-08T10:00:00Z",
myRole = "member",
updatedSortAt = "2026-03-08T10:00:00Z",
)
@@ -121,6 +122,10 @@ class NetworkChatRepositoryTest {
}
}
override fun observeChatById(chatId: Long): Flow<ChatListLocalModel?> {
return chats.map { entities -> entities.firstOrNull { it.id == chatId }?.toLocalModel() }
}
override suspend fun upsertChats(chats: List<ChatEntity>) {
val merged = this.chats.value.associateBy { it.id }.toMutableMap()
chats.forEach { merged[it.id] = it }
@@ -180,6 +185,7 @@ class NetworkChatRepositoryTest {
lastMessageText = lastMessageText,
lastMessageType = lastMessageType,
lastMessageCreatedAt = lastMessageCreatedAt,
myRole = myRole,
updatedSortAt = updatedSortAt,
)
}