mx_sync: One-shot sync against the homeserver

View source: R/messages.R

mx_syncR Documentation

One-shot sync against the homeserver

Description

Calls /sync once and returns immediately. For streaming behaviour, the caller writes its own loop, passing the previous batch's next_batch token as since.

Usage

mx_sync(session, since = NULL, timeout = 0L, filter = NULL)

Arguments

session

An "mx_session" object.

since

Character or NULL. Sync token from a prior sync.

timeout

Integer. Long-poll timeout in milliseconds (0 returns immediately).

filter

Character or NULL. Filter ID or inline JSON filter.

Value

The parsed sync response, including next_batch.

Examples

## Not run: 
batch <- mx_sync(s)
next_batch <- batch$next_batch

## End(Not run)

mx.api documentation built on Sept. 12, 2026, 1:07 a.m.