Skip to main content

cmd_query

Function cmd_query 

Source
pub async fn cmd_query(
    room_ids: &[String],
    token: &str,
    filter: QueryFilter,
    opts: QueryOptions,
) -> Result<()>
Expand description

Unified query entry point for room query and the poll/watch aliases.

Three modes:

  • Historical (new_only = false, wait = false): reads full history, applies filter, no cursor update.
  • New (new_only = true, wait = false): reads since last cursor, applies filter, advances cursor.
  • Wait (wait = true): loops until at least one foreign message passes the filter, then prints and exits.

room_ids lists the rooms to read. filter.rooms may further restrict the output but does not affect which files are opened.