Harden lease lifecycle durability
This commit is contained in:
@@ -422,6 +422,11 @@ func (s Server) action(w http.ResponseWriter, r *http.Request, id, action string
|
||||
http.Error(w, "unknown action", 404)
|
||||
return
|
||||
}
|
||||
if action == "block" {
|
||||
// A browser-created block is an explicit operator decision. Preserve
|
||||
// that fact even if its prose happens to contain a system keyword.
|
||||
body["block_reason"] = string(domain.BlockReasonOperator)
|
||||
}
|
||||
b, _ := json.Marshal(body)
|
||||
e := domain.Event{ID: domain.NewID(), Type: typ, TaskID: id, Version: t.Version + 1, Payload: b, Surface: string(authz.Web)}
|
||||
if err := s.Store.Append(e); err != nil {
|
||||
|
||||
Reference in New Issue
Block a user