android: add minimum invite link join flow
Some checks failed
CI / test (push) Has been cancelled

This commit is contained in:
Codex
2026-03-09 12:59:33 +03:00
parent 37396f4da5
commit e91884e14a
14 changed files with 216 additions and 0 deletions

View File

@@ -14,6 +14,8 @@ import org.junit.Assert.assertEquals
import org.junit.Assert.assertTrue
import org.junit.Test
import ru.daemonlord.messenger.data.chat.api.ChatApiService
import ru.daemonlord.messenger.data.chat.dto.ChatInviteLinkDto
import ru.daemonlord.messenger.data.chat.dto.ChatJoinByInviteRequestDto
import ru.daemonlord.messenger.data.chat.dto.ChatReadDto
import ru.daemonlord.messenger.data.chat.local.dao.ChatDao
import ru.daemonlord.messenger.data.chat.local.entity.ChatEntity
@@ -109,6 +111,14 @@ class NetworkChatRepositoryTest {
override suspend fun getChatById(chatId: Long): ChatReadDto {
return chats.first()
}
override suspend fun createInviteLink(chatId: Long): ChatInviteLinkDto {
return ChatInviteLinkDto(chatId = chatId, token = "token", inviteUrl = "https://chat.daemonlord.ru/invite/token")
}
override suspend fun joinByInvite(request: ChatJoinByInviteRequestDto): ChatReadDto {
return chats.first()
}
}
private class FakeChatDao(