android: add channel role-based send permissions
Some checks failed
CI / test (push) Failing after 2m18s
Some checks failed
CI / test (push) Failing after 2m18s
This commit is contained in:
@@ -88,6 +88,7 @@ class ChatDaoTest {
|
||||
lastMessageText = "hi",
|
||||
lastMessageType = "text",
|
||||
lastMessageCreatedAt = "2026-03-08T10:00:00Z",
|
||||
myRole = "member",
|
||||
updatedSortAt = "2026-03-08T10:00:00Z",
|
||||
)
|
||||
}
|
||||
|
||||
@@ -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,
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user