diff --git a/fun.go b/fun.go index 5467ca0..14e95f5 100644 --- a/fun.go +++ b/fun.go @@ -110,22 +110,11 @@ func unsee(zilences []*regexp.Regexp, precis string, noise string) string { func osmosis(honks []*Honk, userid int64) []*Honk { zords := getzords(userid) - for i, j := 0, len(honks)-1; i < j; i, j = i+1, j-1 { - honks[i], honks[j] = honks[j], honks[i] - } - j := 0 - filtered := make(map[string]bool) outer: for _, h := range honks { - if h.RID != "" && filtered[h.RID] { - filtered[h.XID] = true - continue outer - } - for _, z := range zords { if z.MatchString(h.Precis) || z.MatchString(h.Noise) { - filtered[h.XID] = true continue outer } } @@ -133,9 +122,6 @@ outer: j++ } honks = honks[0:j] - for i, j := 0, len(honks)-1; i < j; i, j = i+1, j-1 { - honks[i], honks[j] = honks[j], honks[i] - } return honks }