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:

  1. Full name starts with the query

  2. Any of the tokens in the name starts with the query

  3. The handle starts with the query

  4. The full name contains the query

  5. 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