mirror of
https://github.com/coder/coder.git
synced 2025-07-03 16:13:58 +00:00
fix(coderd): improve use case handling in notifier for appearance fetchers (#15242)
Fixing #15241 & add tests.
This commit is contained in:
@ -38,6 +38,10 @@ func (n *notifier) fetchAppName(ctx context.Context) (string, error) {
|
||||
}
|
||||
return "", xerrors.Errorf("get application name: %w", err)
|
||||
}
|
||||
|
||||
if appName == "" {
|
||||
appName = notificationsDefaultAppName
|
||||
}
|
||||
return appName, nil
|
||||
}
|
||||
|
||||
@ -49,5 +53,9 @@ func (n *notifier) fetchLogoURL(ctx context.Context) (string, error) {
|
||||
}
|
||||
return "", xerrors.Errorf("get logo URL: %w", err)
|
||||
}
|
||||
|
||||
if logoURL == "" {
|
||||
logoURL = notificationsDefaultLogoURL
|
||||
}
|
||||
return logoURL, nil
|
||||
}
|
||||
|
Reference in New Issue
Block a user