MembersToMentionUseCase

class MembersToMentionUseCase(observeConversationMembers: ObserveConversationMembersUseCase, userRepository: UserRepository, dispatcher: <Error class: unknown class> = 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, userRepository: UserRepository, dispatcher: <Error class: unknown class> = KaliumDispatcherImpl)

Creates an instance of the usecase

Functions

Link copied to clipboard
suspend operator fun invoke(conversationId: <Error class: unknown class>, searchQuery: String): List<<Error class: unknown class>>

search for members to mention in a conversation