compile, then ship

This commit is contained in:
Ted Unangst 2019-10-04 21:49:49 -04:00
parent 50e43569e4
commit 9b28e2f159
1 changed files with 6 additions and 4 deletions

View File

@ -184,7 +184,7 @@ func matchfilter(h *Honk, f *Filter) bool {
func rejectxonk(xonk *Honk) bool { func rejectxonk(xonk *Honk) bool {
filts := getfilters(xonk.UserID, filtReject) filts := getfilters(xonk.UserID, filtReject)
for _, f := range filts { for _, f := range filts {
if matchfilter(xonk, filts) { if matchfilter(xonk, f) {
return true return true
} }
} }
@ -194,7 +194,7 @@ func rejectxonk(xonk *Honk) bool {
func skipMedia(xonk *Honk) bool { func skipMedia(xonk *Honk) bool {
filts := getfilters(xonk.UserID, filtSkipMedia) filts := getfilters(xonk.UserID, filtSkipMedia)
for _, f := range filts { for _, f := range filts {
if matchfilter(xonk, filts) { if matchfilter(xonk, f) {
return true return true
} }
} }
@ -211,9 +211,11 @@ func osmosis(honks []*Honk, userid int64) []*Honk {
j := 0 j := 0
outer: outer:
for _, h := range honks { for _, h := range honks {
if matchfilter(h, filts) { for _, f := range filts {
if matchfilter(h, f) {
continue outer continue outer
} }
}
honks[j] = h honks[j] = h
j++ j++
} }