(notif codersdk.InboxNotification)
| 60 | } |
| 61 | |
| 62 | func 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 |
| 77 | func convertInboxNotificationResponse(ctx context.Context, logger slog.Logger, notif database.InboxNotification) codersdk.InboxNotification { |
no outgoing calls