fix memes
This commit is contained in:
parent
2584f31e17
commit
d62486db27
|
@ -844,6 +844,7 @@ func jonkjonk(user *WhatAbout, h *Honk) (junk.Junk, junk.Junk) {
|
||||||
jo["directMessage"] = true
|
jo["directMessage"] = true
|
||||||
}
|
}
|
||||||
translate(h)
|
translate(h)
|
||||||
|
h.Noise = re_memes.ReplaceAllString(h.Noise, "")
|
||||||
jo["summary"] = h.Precis
|
jo["summary"] = h.Precis
|
||||||
jo["content"] = ontologize(mentionize(h.Noise))
|
jo["content"] = ontologize(mentionize(h.Noise))
|
||||||
if strings.HasPrefix(h.Precis, "DZ:") {
|
if strings.HasPrefix(h.Precis, "DZ:") {
|
||||||
|
|
4
fun.go
4
fun.go
|
@ -45,6 +45,7 @@ func reverbolate(userid int64, honks []*Honk) {
|
||||||
h.Style += " limited"
|
h.Style += " limited"
|
||||||
}
|
}
|
||||||
translate(h)
|
translate(h)
|
||||||
|
h.Noise = re_memes.ReplaceAllString(h.Noise, "")
|
||||||
if h.Whofore == 2 || h.Whofore == 3 {
|
if h.Whofore == 2 || h.Whofore == 3 {
|
||||||
h.URL = h.XID
|
h.URL = h.XID
|
||||||
if h.What != "bonked" {
|
if h.What != "bonked" {
|
||||||
|
@ -121,7 +122,6 @@ func translate(honk *Honk) {
|
||||||
noise = strings.TrimSpace(noise)
|
noise = strings.TrimSpace(noise)
|
||||||
noise = quickrename(noise, honk.UserID)
|
noise = quickrename(noise, honk.UserID)
|
||||||
noise = obfusbreak(noise)
|
noise = obfusbreak(noise)
|
||||||
noise = re_memes.ReplaceAllString(noise, "")
|
|
||||||
|
|
||||||
honk.Noise = noise
|
honk.Noise = noise
|
||||||
honk.Onts = oneofakind(ontologies(honk.Noise))
|
honk.Onts = oneofakind(ontologies(honk.Noise))
|
||||||
|
@ -277,7 +277,7 @@ func memetize(honk *Honk) {
|
||||||
fd.Close()
|
fd.Close()
|
||||||
|
|
||||||
url := fmt.Sprintf("https://%s/meme/%s", serverName, name)
|
url := fmt.Sprintf("https://%s/meme/%s", serverName, name)
|
||||||
res, err := stmtSaveFile.Exec("", name, url, ct, 0, "")
|
res, err := stmtSaveFile.Exec("", name, name, url, ct, 0, "")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Printf("error saving meme: %s", err)
|
log.Printf("error saving meme: %s", err)
|
||||||
return x
|
return x
|
||||||
|
|
Loading…
Reference in New Issue