MembersToMentionUseCase
class MembersToMentionUseCase(observeConversationMembers: ObserveConversationMembersUseCase, selfUserId: UserId, dispatcher: KaliumDispatcher = KaliumDispatcherImpl)
This usecase returns a list of members to mention for a given conversation based on a search done with searchQuery The result should ordered respecting this order of priorities:
Full name starts with the query
Any of the tokens in the name starts with the query
The handle starts with the query
The full name contains the query
The handle contains the query
Parameters
observeConversationMembers
Returns members of a given conversation.
userRepository
Retrieves the self user
Constructors
Link copied to clipboard
internal constructor(observeConversationMembers: ObserveConversationMembersUseCase, selfUserId: UserId, dispatcher: KaliumDispatcher = KaliumDispatcherImpl)
Creates an instance of the usecase
Functions
Link copied to clipboard
suspend operator fun invoke(conversationId: ConversationId, searchQuery: String): List<MemberDetails>
search for members to mention in a conversation