MCPcopy Create free account
hub / github.com/TheThingsNetwork/lorawan-stack / GetNotification

Function GetNotification

pkg/email/notification.go:86–93  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

84
85// GetNotification returns a registered email notification from the registry in the context (if available), otherwise falling back to the default registry.
86func 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.
96type NotificationTemplateData interface {

Callers 4

createNotificationMethod · 0.92
notifyAdminsInternalMethod · 0.92

Calls 2

GetNotificationMethod · 0.65

Tested by 1