make redoimages a separate function
This commit is contained in:
parent
0df1a08165
commit
50fb0d5e09
|
@ -1027,7 +1027,8 @@ func jonkjonk(user *WhatAbout, h *Honk) (junk.Junk, junk.Junk) {
|
|||
jo["directMessage"] = true
|
||||
}
|
||||
mentions := bunchofgrapes(h.Noise)
|
||||
translate(h, true)
|
||||
translate(h)
|
||||
redoimages(h)
|
||||
jo["summary"] = html.EscapeString(h.Precis)
|
||||
jo["content"] = h.Noise
|
||||
if h.Precis != "" {
|
||||
|
|
8
fun.go
8
fun.go
|
@ -61,7 +61,7 @@ func reverbolate(userid int64, honks []*Honk) {
|
|||
if !h.Public {
|
||||
h.Style += " limited"
|
||||
}
|
||||
translate(h, false)
|
||||
translate(h)
|
||||
local := false
|
||||
if (h.Whofore == 2 || h.Whofore == 3) && h.What != "bonked" {
|
||||
local = true
|
||||
|
@ -198,7 +198,7 @@ func imaginate(honk *Honk) {
|
|||
htf.String(honk.Noise)
|
||||
}
|
||||
|
||||
func translate(honk *Honk, redoimages bool) {
|
||||
func translate(honk *Honk) {
|
||||
if honk.Format == "html" {
|
||||
return
|
||||
}
|
||||
|
@ -219,8 +219,9 @@ func translate(honk *Honk, redoimages bool) {
|
|||
noise = markitzero(noise)
|
||||
honk.Noise = noise
|
||||
honk.Onts = oneofakind(ontologies(honk.Noise))
|
||||
}
|
||||
|
||||
if redoimages {
|
||||
func redoimages(honk *Honk) {
|
||||
zap := make(map[string]bool)
|
||||
{
|
||||
var htf htfilter.Filter
|
||||
|
@ -244,7 +245,6 @@ func translate(honk *Honk, redoimages bool) {
|
|||
honk.Noise = ontologize(mentionize(honk.Noise))
|
||||
honk.Noise = strings.Replace(honk.Noise, "<a href=", "<a class=\"mention u-url\" href=", -1)
|
||||
}
|
||||
}
|
||||
|
||||
func xcelerate(b []byte) string {
|
||||
letters := "BCDFGHJKLMNPQRSTVWXYZbcdfghjklmnpqrstvwxyz1234567891234567891234"
|
||||
|
|
Loading…
Reference in New Issue