all repos — honk @ 8155e0381831de80cbea83c68104542a5bc39ff0

my fork of honk

can simplify the reverb logic some
Ted Unangst tedu@tedunangst.com
Sun, 01 Dec 2019 12:34:08 -0500
commit

8155e0381831de80cbea83c68104542a5bc39ff0

parent

9b37ae3807b669b8b9213604bc2660ebab52e800

1 files changed, 16 insertions(+), 21 deletions(-)

jump to
M fun.gofun.go

@@ -63,31 +63,26 @@ h.Style += " limited"

} translate(h, false) local := false - if (h.Whofore == 2 || h.Whofore == 3) || h.What != "bonked" { + if (h.Whofore == 2 || h.Whofore == 3) && h.What != "bonked" { local = true } - if h.Whofore == 2 || h.Whofore == 3 { - h.URL = h.XID - if h.What != "bonked" { - h.Noise = re_memes.ReplaceAllString(h.Noise, "") - h.Noise = mentionize(h.Noise) - h.Noise = ontologize(h.Noise) - } - h.Username, h.Handle = handles(h.Honker) + if local { + h.Noise = re_memes.ReplaceAllString(h.Noise, "") + h.Noise = mentionize(h.Noise) + h.Noise = ontologize(h.Noise) + } + h.Username, h.Handle = handles(h.Honker) + short := shortname(userid, h.Honker) + if short != "" { + h.Username = short } else { - _, h.Handle = handles(h.Honker) - short := shortname(userid, h.Honker) - if short != "" { - h.Username = short - } else { - h.Username = h.Handle - if len(h.Username) > 20 { - h.Username = h.Username[:20] + ".." - } + h.Username = h.Handle + if len(h.Username) > 20 { + h.Username = h.Username[:20] + ".." } - if h.URL == "" { - h.URL = h.XID - } + } + if h.URL == "" { + h.URL = h.XID } if h.Oonker != "" { _, h.Oondle = handles(h.Oonker)