fix(GODT-2328): Ignore labels that aren't part of user label set

This commit is contained in:
James Houlahan 2023-02-02 16:25:27 +01:00 committed by Jakub
parent ea11c1046a
commit 4cf23bb2e6
2 changed files with 7 additions and 1 deletions

View File

@ -5,6 +5,7 @@ Changelog [format](http://keepachangelog.com/en/1.0.0/)
## [Bridge 3.0.13] Perth Narrows
### Fixed
GODT-2328: Ignore labels that aren't part of user label set.
GODT-2326: Sync issue on missing fresh DB file.
GODT-2319: Seed the math/rand RNG on app startup.
GODT-1804: Preserve MIME parameters when uploading attachments.

View File

@ -463,6 +463,11 @@ func wantLabel(label proton.Label) bool {
func wantLabels(apiLabels map[string]proton.Label, labelIDs []string) []string {
return xslices.Filter(labelIDs, func(labelID string) bool {
return wantLabel(apiLabels[labelID])
apiLabel, ok := apiLabels[labelID]
if !ok {
return false
}
return wantLabel(apiLabel)
})
}