all repos — honk @ 6d7cee00bf561358469f786c983fc40f518d62df

my fork of honk

read avatar option from db
Ted Unangst tedu@tedunangst.com
Wed, 06 Nov 2019 21:33:13 -0500
commit

6d7cee00bf561358469f786c983fc40f518d62df

parent

d8b5658a6f5adbcdbe5ce7cff881613ee55e82e4

2 files changed, 7 insertions(+), 2 deletions(-)

jump to
M activity.goactivity.go

@@ -1263,7 +1263,11 @@ j["following"] = user.URL + "/following"

a := junk.New() a["type"] = "Image" a["mediaType"] = "image/png" - a["url"] = fmt.Sprintf("https://%s/a?a=%s", serverName, url.QueryEscape(user.URL)) + if ava := user.Options.Avatar; ava != "" { + a["url"] = ava + } else { + a["url"] = fmt.Sprintf("https://%s/a?a=%s", serverName, url.QueryEscape(user.URL)) + } j["icon"] = a } else { j["type"] = "Service"
M honk.gohonk.go

@@ -46,7 +46,8 @@ SecKey *rsa.PrivateKey

} type UserOptions struct { - SkinnyCSS bool `json:",omitempty"` + SkinnyCSS bool `json:",omitempty"` + Avatar string `json:",omitempty"` } type KeyInfo struct {