feat(runtime/v2): Add pre and post msg handler register (#21346)

This commit is contained in:
son trinh
2024-08-19 10:26:56 +00:00
committed by GitHub
parent c50c6b2549
commit 294b608022
2 changed files with 20 additions and 9 deletions
+8 -1
View File
@@ -424,7 +424,14 @@ func (m *MM[T]) RegisterServices(app *App[T]) error {
}
}
// TODO: register pre and post msg
// register pre and post msg
if module, ok := module.(appmodulev2.HasPreMsgHandlers); ok {
module.RegisterPreMsgHandlers(app.msgRouterBuilder)
}
if module, ok := module.(appmodulev2.HasPostMsgHandlers); ok {
module.RegisterPostMsgHandlers(app.msgRouterBuilder)
}
}
return nil