mirror of
https://github.com/jwetzell/showbridge-go.git
synced 2026-04-26 21:05:30 +00:00
add Source to wrapped payload
This commit is contained in:
@@ -8,6 +8,7 @@ type WrappedPayload struct {
|
|||||||
Payload any
|
Payload any
|
||||||
Modules any
|
Modules any
|
||||||
Sender any
|
Sender any
|
||||||
|
Source string
|
||||||
End bool
|
End bool
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -25,5 +26,10 @@ func GetWrappedPayload(ctx context.Context, payload any) WrappedPayload {
|
|||||||
if sender != nil {
|
if sender != nil {
|
||||||
templateData.Sender = sender
|
templateData.Sender = sender
|
||||||
}
|
}
|
||||||
|
|
||||||
|
source := ctx.Value(SourceContextKey)
|
||||||
|
if source != nil {
|
||||||
|
templateData.Source = source.(string)
|
||||||
|
}
|
||||||
return templateData
|
return templateData
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user