This commit is contained in:
commit
9a67ed5b62
|
@ -1061,8 +1061,7 @@ func jonkjonk(user *WhatAbout, h *Honk) (junk.Junk, junk.Junk) {
|
|||
}
|
||||
|
||||
var tags []junk.Junk
|
||||
g := bunchofgrapes(h.Noise)
|
||||
for _, m := range g {
|
||||
for _, m := range bunchofgrapes(h.Noise) {
|
||||
t := junk.New()
|
||||
t["type"] = "Mention"
|
||||
t["name"] = m.who
|
||||
|
@ -1077,8 +1076,7 @@ func jonkjonk(user *WhatAbout, h *Honk) (junk.Junk, junk.Junk) {
|
|||
t["name"] = o
|
||||
tags = append(tags, t)
|
||||
}
|
||||
herd := herdofemus(h.Noise)
|
||||
for _, e := range herd {
|
||||
for _, e := range herdofemus(h.Noise) {
|
||||
t := junk.New()
|
||||
t["id"] = e.ID
|
||||
t["type"] = "Emoji"
|
||||
|
|
19
fun.go
19
fun.go
|
@ -538,18 +538,17 @@ func firstclass(honk *Honk) bool {
|
|||
}
|
||||
|
||||
func oneofakind(a []string) []string {
|
||||
var x []string
|
||||
for n, s := range a {
|
||||
if s != "" {
|
||||
x = append(x, s)
|
||||
for i := n + 1; i < len(a); i++ {
|
||||
if a[i] == s {
|
||||
a[i] = ""
|
||||
}
|
||||
}
|
||||
seen := make(map[string]bool)
|
||||
seen[""] = true
|
||||
j := 0
|
||||
for _, s := range a {
|
||||
if !seen[s] {
|
||||
seen[s] = true
|
||||
a[j] = s
|
||||
j++
|
||||
}
|
||||
}
|
||||
return x
|
||||
return a[:j]
|
||||
}
|
||||
|
||||
var ziggies = make(map[string]*rsa.PrivateKey)
|
||||
|
|
5
web.go
5
web.go
|
@ -1534,13 +1534,11 @@ func fingerlicker(w http.ResponseWriter, r *http.Request) {
|
|||
j := junk.New()
|
||||
j["subject"] = fmt.Sprintf("acct:%s@%s", user.Name, serverName)
|
||||
j["aliases"] = []string{user.URL}
|
||||
var links []junk.Junk
|
||||
l := junk.New()
|
||||
l["rel"] = "self"
|
||||
l["type"] = `application/activity+json`
|
||||
l["href"] = user.URL
|
||||
links = append(links, l)
|
||||
j["links"] = links
|
||||
j["links"] = []junk.Junk{l}
|
||||
|
||||
w.Header().Set("Cache-Control", "max-age=3600")
|
||||
w.Header().Set("Content-Type", "application/jrd+json")
|
||||
|
@ -1565,6 +1563,7 @@ func servecss(w http.ResponseWriter, r *http.Request) {
|
|||
http.NotFound(w, r)
|
||||
return
|
||||
}
|
||||
defer fd.Close()
|
||||
w.Header().Set("Cache-Control", "max-age=0")
|
||||
w.Header().Set("Content-Type", "text/css; charset=utf-8")
|
||||
err = css.Filter(fd, w)
|
||||
|
|
Loading…
Reference in New Issue