redacted_because:isPlainObject,// FIXME: Cannot do recursion with isRoomEvent (/isStateEvent) -- fixable via `dynamic` wrapper, so that the rules are only generated *after* the validator has finished being declared?
// Obsolete field originating from a now-defunct Synapse fork running on ponies.im
origin_server_ipts:[isInteger],
unsigned:optionalObject({
age:isInteger,
transaction_id:isString,
redacted_because:isPlainObject,// FIXME: Cannot do recursion with isRoomEvent (/isStateEvent) -- fixable via `dynamic` wrapper, so that the rules are only generated *after* the validator has finished being declared?
// NOTE: Despite what the spec currently says, state.events *can* contain membership events when the timeline isn't limited, when lazy-loading is enabled
// NOTE: Despite what the spec currently says, state.events *can* contain membership events when the timeline isn't limited, when lazy-loading is enabled
syncResponseBody:[required,isSyncResponse],// TODO: Validate and normalize the response body, including setting defaults, and allowing extra properties
syncResponseBody:[required,isSyncResponse(strict)],// TODO: Validate and normalize the response body, including setting defaults, and allowing extra properties
});
// We keep an event ID -> event body mapping, to ensure that the same event in different places in the response maps to the same in-memory object in our resulting event list; this is useful both to save memory, and to make equality-checking operations work