GetNotification returns a registered email notification from the registry in the context (if available), otherwise falling back to the default registry.
(ctx context.Context, name string)
| 84 | |
| 85 | // GetNotification returns a registered email notification from the registry in the context (if available), otherwise falling back to the default registry. |
| 86 | func GetNotification(ctx context.Context, name string) *NotificationBuilder { |
| 87 | if reg, ok := notificationRegistryFromContext(ctx); ok { |
| 88 | if tmpl := reg.GetNotification(ctx, name); tmpl != nil { |
| 89 | return tmpl |
| 90 | } |
| 91 | } |
| 92 | return defaultNotificationRegistry.GetNotification(ctx, name) |
| 93 | } |
| 94 | |
| 95 | // NotificationTemplateData extends TemplateData for notifications. |
| 96 | type NotificationTemplateData interface { |