core.check-event
- description
- Rules for accepting a signed event (after the signature and the shape are checked). The server gives only the facts it has stored (core.event-check-facts); what the rules use is derived here (core.event-check-state-of). Returns the reasons to reject it (empty means accept). The server runs this on SubmitEvent. See docs/event.md
- type
Fn(content: @core.event-content, facts: @core.event-check-facts) -> List<@core.event-rejection>
- expression
fn(content$0, facts$1) => @core.check-event-in-state( content: $0, state: match $0 { #project_commit(commit$2) => @core.event-check-state-of(commit: $2, facts: $1), #project_branch_status(change$3) => @core.event-check-state-of-branch(project_name: $3.project_name, branch: $3.branch, facts: $1), _ => { account_created: $1.account_created, branch_latest_commit_hash: #none, is_branch_creator: false, merged_in_project: false, modules_in_other_projects: [], parent_in_project: false, project_has_commits: false } } )
- visibility
- public
core.check-event (project definy, branch quote-encoded-parts, snapshot LbKb9vIRs5vdtsu6TiOqZ_NMUZJ6k1s6WlbZOc6x3-I) id: 2Lyy0ECmSisPD-K2PsEVhG_Iy-UUxjqGzd8NjlA9bFo content hash: 886Aqqn8H2XCMP0YxT0dqIU9xpPpRvCPHZt5fEziNK8