Skip to content

Commit

Permalink
[FEATURE]#74 : 메세지 필터링 구현
Browse files Browse the repository at this point in the history
  • Loading branch information
jeongjaino committed Aug 3, 2024
1 parent d17ad15 commit 6aaf659
Showing 1 changed file with 15 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package com.bff.wespot.domain.usecase

import com.bff.wespot.domain.repository.message.MessageRepository
import com.bff.wespot.model.message.request.MessageType
import com.bff.wespot.model.message.response.Message
import javax.inject.Inject

class GetBlockedMessageListUseCase @Inject constructor(
private val messageRepository: MessageRepository,
) {
suspend operator fun invoke(cursorId: Int): Result<List<Message>> =
messageRepository.getMessageList(MessageType.RECEIVED, cursorId).mapCatching {
it.messages.filter { it.isBlocked }
}
}

0 comments on commit 6aaf659

Please sign in to comment.