add sender to template data for relevant modules

This commit is contained in:
Joel Wetzell
2026-03-04 19:38:30 -06:00
parent dff33f722d
commit 38b8e44f04
5 changed files with 22 additions and 3 deletions

View File

@@ -50,6 +50,7 @@ func GetAnyAs[T any](p any) (T, bool) {
type TemplateData struct {
Payload any
Modules any
Sender any
}
func GetTemplateData(ctx context.Context, payload any) TemplateData {
@@ -58,5 +59,10 @@ func GetTemplateData(ctx context.Context, payload any) TemplateData {
if modules != nil {
templateData.Modules = modules
}
sender := ctx.Value(common.SenderContextKey)
if sender != nil {
templateData.Sender = sender
}
return templateData
}