read avatar option from db

master
Ted Unangst 5 years ago
parent 3538116ba9
commit 778a3b1d79

@ -1263,7 +1263,11 @@ func junkuser(user *WhatAbout) []byte {
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"

@ -46,7 +46,8 @@ type WhatAbout struct {
}
type UserOptions struct {
SkinnyCSS bool `json:",omitempty"`
SkinnyCSS bool `json:",omitempty"`
Avatar string `json:",omitempty"`
}
type KeyInfo struct {

Loading…
Cancel
Save