Ignore default windows icons

This commit is contained in:
Daniel
2024-04-17 16:56:16 +02:00
parent f0bed8f794
commit a457ac4245
4 changed files with 56 additions and 2 deletions

View File

@@ -100,7 +100,12 @@ func handleGetProfileIcon(ar *api.Request) (data []byte, err error) {
// Get profile icon.
data, err = binmeta.GetProfileIcon(name)
if err != nil {
switch {
case err == nil:
// Continue
case errors.Is(err, binmeta.IconIgnored):
return nil, api.ErrorWithStatus(err, http.StatusNotFound)
default:
return nil, err
}