Chatto.Api.V1.MessageSearchService (chatto v0.1.0)

Copy Markdown View Source

Searches current message content visible to an authenticated user.

Summary

Functions

Reports whether the operator enabled Search and whether its provider can currently answer. This method remains available when Search is disabled.

Searches current message bodies in rooms where the caller is a member. Scope and grouping are independent, including for direct messages. THREAD grouping returns one row per matching root and its replies. Scope, grouping, and ordering are part of the cursor scope. Unsupported combinations return INVALID_ARGUMENT. Existing requests return individual messages by default. Results also require message.read or a matching thread relationship with message.read-interactions. Results are authorized and hydrated from current Chatto state after provider matching. Returns FAILED_PRECONDITION when Search is disabled and UNAVAILABLE when its provider is not ready.

Functions

get_status(client, request)

@spec get_status(Req.Request.t(), Chatto.Api.V1.GetStatusRequest.t()) ::
  {:ok, Chatto.Api.V1.GetStatusResponse.t()}
  | {:error, Chatto.Connect.Error.t()}

Reports whether the operator enabled Search and whether its provider can currently answer. This method remains available when Search is disabled.

search_messages(client, request)

@spec search_messages(Req.Request.t(), Chatto.Api.V1.SearchMessagesRequest.t()) ::
  {:ok, Chatto.Api.V1.SearchMessagesResponse.t()}
  | {:error, Chatto.Connect.Error.t()}

Searches current message bodies in rooms where the caller is a member. Scope and grouping are independent, including for direct messages. THREAD grouping returns one row per matching root and its replies. Scope, grouping, and ordering are part of the cursor scope. Unsupported combinations return INVALID_ARGUMENT. Existing requests return individual messages by default. Results also require message.read or a matching thread relationship with message.read-interactions. Results are authorized and hydrated from current Chatto state after provider matching. Returns FAILED_PRECONDITION when Search is disabled and UNAVAILABLE when its provider is not ready.