search

abstract suspend fun search(    searchTerm: String,     roomId: String,     nextBatch: String?,     orderByRecent: Boolean,     limit: Int,     beforeLimit: Int,     afterLimit: Int,     includeProfile: Boolean): SearchResult

Generic function to search a term in a room. Ref: https://matrix.org/docs/spec/client_server/latest#module-search

Parameters

searchTerm

the term to search

roomId

the roomId to search term inside

nextBatch

the token that retrieved from the previous response. Should be provided to get the next batch of results

orderByRecent

if true, the most recent message events will return in the first places of the list

limit

the maximum number of events to return.

beforeLimit

how many events before the result are returned.

afterLimit

how many events after the result are returned.

includeProfile

requests that the server returns the historic profile information for the users that sent the events that were returned.