pub async fn handle_position_changes<B: ChatBackend>(
backend: &B,
caller: &B::CallerCtx,
args: Value,
) -> Result<HandlerOutput, JmapError>Expand description
Handle a ReadPosition/changes method call (draft-atwood-jmap-chat-00 §ReadPosition).
args is the RFC 8620 §5.2 /changes request shape (accountId,
sinceState, optional maxChanges); the returned Value is the
§5.2 /changes response shape (accountId, oldState, newState,
hasMoreChanges, created, updated, destroyed).
Returns (response_args, extra_invocations). The extra list is always empty.
§Errors
Returns a method-level JmapError:
invalidArgumentswhenaccountIdis missing or not a valid Id,sinceStateis missing, ormaxChangesis not a positive integer;accountNotFoundwhen the backend does not knowaccountId;cannotCalculateChangeswhen the backend cannot compute the changes sincesinceState;serverFailwhen the backend fails.