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
prev_sender:isMatrixID,
origin_server_ipts:[isInteger],
// MSC 1849, not merged yet: https://github.com/matrix-org/matrix-doc/blob/matthew/msc1849/proposals/1849-aggregations.md
unsigned:optionalObject({
"m.relations":{
age:isInteger,
"m.annotation":isPaginatedChunkOf({
transaction_id:isString,
type:[required,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
"m.invited_member_count":isInteger,
state:optionalObject({
}),
events:optionalArray(isStateList)
// 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
// 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