MCPcopy Index your code
hub / github.com/coder/coder / ensureNotificationIcon

Function ensureNotificationIcon

coderd/inboxnotifications.go:62–74  ·  view source on GitHub ↗
(notif codersdk.InboxNotification)

Source from the content-addressed store, hash-verified

60}
61
62func ensureNotificationIcon(notif codersdk.InboxNotification) codersdk.InboxNotification {
63 if notif.Icon != "" {
64 return notif
65 }
66
67 fallbackIcon, ok := fallbackIcons[notif.TemplateID]
68 if !ok {
69 fallbackIcon = codersdk.InboxNotificationFallbackIconOther
70 }
71
72 notif.Icon = fallbackIcon
73 return notif
74}
75
76// convertInboxNotificationResponse works as a util function to transform a database.InboxNotification to codersdk.InboxNotification
77func convertInboxNotificationResponse(ctx context.Context, logger slog.Logger, notif database.InboxNotification) codersdk.InboxNotification {

Calls

no outgoing calls