can simplify the reverb logic some
This commit is contained in:
parent
d164471a92
commit
d5d943b203
1 changed files with 16 additions and 21 deletions
9
fun.go
9
fun.go
|
@ -63,19 +63,15 @@ func reverbolate(userid int64, honks []*Honk) {
|
||||||
}
|
}
|
||||||
translate(h, false)
|
translate(h, false)
|
||||||
local := 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
|
local = true
|
||||||
}
|
}
|
||||||
if h.Whofore == 2 || h.Whofore == 3 {
|
if local {
|
||||||
h.URL = h.XID
|
|
||||||
if h.What != "bonked" {
|
|
||||||
h.Noise = re_memes.ReplaceAllString(h.Noise, "")
|
h.Noise = re_memes.ReplaceAllString(h.Noise, "")
|
||||||
h.Noise = mentionize(h.Noise)
|
h.Noise = mentionize(h.Noise)
|
||||||
h.Noise = ontologize(h.Noise)
|
h.Noise = ontologize(h.Noise)
|
||||||
}
|
}
|
||||||
h.Username, h.Handle = handles(h.Honker)
|
h.Username, h.Handle = handles(h.Honker)
|
||||||
} else {
|
|
||||||
_, h.Handle = handles(h.Honker)
|
|
||||||
short := shortname(userid, h.Honker)
|
short := shortname(userid, h.Honker)
|
||||||
if short != "" {
|
if short != "" {
|
||||||
h.Username = short
|
h.Username = short
|
||||||
|
@ -88,7 +84,6 @@ func reverbolate(userid int64, honks []*Honk) {
|
||||||
if h.URL == "" {
|
if h.URL == "" {
|
||||||
h.URL = h.XID
|
h.URL = h.XID
|
||||||
}
|
}
|
||||||
}
|
|
||||||
if h.Oonker != "" {
|
if h.Oonker != "" {
|
||||||
_, h.Oondle = handles(h.Oonker)
|
_, h.Oondle = handles(h.Oonker)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue