@@ -29,32 +29,32 @@ const (
29
29
notificationFormatPlaintext = "plaintext"
30
30
)
31
31
32
- var fallbackIcons = map [uuid.UUID ]codersdk. InboxNotificationFallbackIcon {
32
+ var fallbackIcons = map [uuid.UUID ]string {
33
33
// workspace related notifications
34
- notifications .TemplateWorkspaceCreated : codersdk .FallbackIconWorkspace ,
35
- notifications .TemplateWorkspaceManuallyUpdated : codersdk .FallbackIconWorkspace ,
36
- notifications .TemplateWorkspaceDeleted : codersdk .FallbackIconWorkspace ,
37
- notifications .TemplateWorkspaceAutobuildFailed : codersdk .FallbackIconWorkspace ,
38
- notifications .TemplateWorkspaceDormant : codersdk .FallbackIconWorkspace ,
39
- notifications .TemplateWorkspaceAutoUpdated : codersdk .FallbackIconWorkspace ,
40
- notifications .TemplateWorkspaceMarkedForDeletion : codersdk .FallbackIconWorkspace ,
41
- notifications .TemplateWorkspaceManualBuildFailed : codersdk .FallbackIconWorkspace ,
42
- notifications .TemplateWorkspaceOutOfMemory : codersdk .FallbackIconWorkspace ,
43
- notifications .TemplateWorkspaceOutOfDisk : codersdk .FallbackIconWorkspace ,
34
+ notifications .TemplateWorkspaceCreated : codersdk .InboxNotificationFallbackIconWorkspace ,
35
+ notifications .TemplateWorkspaceManuallyUpdated : codersdk .InboxNotificationFallbackIconWorkspace ,
36
+ notifications .TemplateWorkspaceDeleted : codersdk .InboxNotificationFallbackIconWorkspace ,
37
+ notifications .TemplateWorkspaceAutobuildFailed : codersdk .InboxNotificationFallbackIconWorkspace ,
38
+ notifications .TemplateWorkspaceDormant : codersdk .InboxNotificationFallbackIconWorkspace ,
39
+ notifications .TemplateWorkspaceAutoUpdated : codersdk .InboxNotificationFallbackIconWorkspace ,
40
+ notifications .TemplateWorkspaceMarkedForDeletion : codersdk .InboxNotificationFallbackIconWorkspace ,
41
+ notifications .TemplateWorkspaceManualBuildFailed : codersdk .InboxNotificationFallbackIconWorkspace ,
42
+ notifications .TemplateWorkspaceOutOfMemory : codersdk .InboxNotificationFallbackIconWorkspace ,
43
+ notifications .TemplateWorkspaceOutOfDisk : codersdk .InboxNotificationFallbackIconWorkspace ,
44
44
45
45
// account related notifications
46
- notifications .TemplateUserAccountCreated : codersdk .FallbackIconAccount ,
47
- notifications .TemplateUserAccountDeleted : codersdk .FallbackIconAccount ,
48
- notifications .TemplateUserAccountSuspended : codersdk .FallbackIconAccount ,
49
- notifications .TemplateUserAccountActivated : codersdk .FallbackIconAccount ,
50
- notifications .TemplateYourAccountSuspended : codersdk .FallbackIconAccount ,
51
- notifications .TemplateYourAccountActivated : codersdk .FallbackIconAccount ,
52
- notifications .TemplateUserRequestedOneTimePasscode : codersdk .FallbackIconAccount ,
46
+ notifications .TemplateUserAccountCreated : codersdk .InboxNotificationFallbackIconAccount ,
47
+ notifications .TemplateUserAccountDeleted : codersdk .InboxNotificationFallbackIconAccount ,
48
+ notifications .TemplateUserAccountSuspended : codersdk .InboxNotificationFallbackIconAccount ,
49
+ notifications .TemplateUserAccountActivated : codersdk .InboxNotificationFallbackIconAccount ,
50
+ notifications .TemplateYourAccountSuspended : codersdk .InboxNotificationFallbackIconAccount ,
51
+ notifications .TemplateYourAccountActivated : codersdk .InboxNotificationFallbackIconAccount ,
52
+ notifications .TemplateUserRequestedOneTimePasscode : codersdk .InboxNotificationFallbackIconAccount ,
53
53
54
54
// template related notifications
55
- notifications .TemplateTemplateDeleted : codersdk .FallbackIconTemplate ,
56
- notifications .TemplateTemplateDeprecated : codersdk .FallbackIconTemplate ,
57
- notifications .TemplateWorkspaceBuildsFailedReport : codersdk .FallbackIconTemplate ,
55
+ notifications .TemplateTemplateDeleted : codersdk .InboxNotificationFallbackIconTemplate ,
56
+ notifications .TemplateTemplateDeprecated : codersdk .InboxNotificationFallbackIconTemplate ,
57
+ notifications .TemplateWorkspaceBuildsFailedReport : codersdk .InboxNotificationFallbackIconTemplate ,
58
58
}
59
59
60
60
func ensureNotificationIcon (notif codersdk.InboxNotification ) codersdk.InboxNotification {
@@ -64,7 +64,7 @@ func ensureNotificationIcon(notif codersdk.InboxNotification) codersdk.InboxNoti
64
64
65
65
fallbackIcon , ok := fallbackIcons [notif .TemplateID ]
66
66
if ! ok {
67
- fallbackIcon = codersdk .FallbackIconOther
67
+ fallbackIcon = codersdk .InboxNotificationFallbackIconOther
68
68
}
69
69
70
70
notif .Icon = fallbackIcon
@@ -80,7 +80,7 @@ func convertInboxNotificationResponse(ctx context.Context, logger slog.Logger, n
80
80
Targets : notif .Targets ,
81
81
Title : notif .Title ,
82
82
Content : notif .Content ,
83
- Icon : codersdk . InboxNotificationFallbackIcon ( notif .Icon ) ,
83
+ Icon : notif .Icon ,
84
84
Actions : func () []codersdk.InboxNotificationAction {
85
85
var actionsList []codersdk.InboxNotificationAction
86
86
err := json .Unmarshal ([]byte (notif .Actions ), & actionsList )
0 commit comments