Skip to content

Commit dabeac9

Browse files
committed
fix(notifications): return default parameters for empty values
1 parent 91c337a commit dabeac9

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

coderd/notifications/fetcher.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@ func (n *notifier) fetchAppName(ctx context.Context) (string, error) {
3838
}
3939
return "", xerrors.Errorf("get application name: %w", err)
4040
}
41+
42+
if appName == "" {
43+
appName = notificationsDefaultAppName
44+
}
4145
return appName, nil
4246
}
4347

@@ -49,5 +53,9 @@ func (n *notifier) fetchLogoURL(ctx context.Context) (string, error) {
4953
}
5054
return "", xerrors.Errorf("get logo URL: %w", err)
5155
}
56+
57+
if logoURL == "" {
58+
logoURL = notificationsDefaultLogoURL
59+
}
5260
return logoURL, nil
5361
}

0 commit comments

Comments
 (0)