using afIoc::Injectusing afIoc::Registryusing afBedSheet::HttpPipelineusing afBedSheet::HttpPipelineFilterusing draft::Flash as DraftFlashusing web::WebReq** A http filter that ensures draft 'Flash' is saved to your session at the end of a request.constclass DraftFlashFilter : HttpPipelineFilter { @Inject privateconst Registry registryinternalnew make(|This|in){ in(this)}override Bool service(HttpPipeline handler){ flash := draftFlash() handled := handler.service// I'm not gonna stick this in a finally, 'cos Draft doesn't and I'm emulating it's behaviour webReq.session["draft.flash"] = flash.res.roreturn handled}private DraftFlash draftFlash(){ registry.dependencyByType(DraftFlash#)}private WebReq webReq(){ registry.dependencyByType(WebReq#)}}