read avatar option from db
This commit is contained in:
parent
3538116ba9
commit
778a3b1d79
2 changed files with 7 additions and 2 deletions
|
|
@ -1263,7 +1263,11 @@ func junkuser(user *WhatAbout) []byte {
|
||||||
a := junk.New()
|
a := junk.New()
|
||||||
a["type"] = "Image"
|
a["type"] = "Image"
|
||||||
a["mediaType"] = "image/png"
|
a["mediaType"] = "image/png"
|
||||||
|
if ava := user.Options.Avatar; ava != "" {
|
||||||
|
a["url"] = ava
|
||||||
|
} else {
|
||||||
a["url"] = fmt.Sprintf("https://%s/a?a=%s", serverName, url.QueryEscape(user.URL))
|
a["url"] = fmt.Sprintf("https://%s/a?a=%s", serverName, url.QueryEscape(user.URL))
|
||||||
|
}
|
||||||
j["icon"] = a
|
j["icon"] = a
|
||||||
} else {
|
} else {
|
||||||
j["type"] = "Service"
|
j["type"] = "Service"
|
||||||
|
|
|
||||||
1
honk.go
1
honk.go
|
|
@ -47,6 +47,7 @@ type WhatAbout struct {
|
||||||
|
|
||||||
type UserOptions struct {
|
type UserOptions struct {
|
||||||
SkinnyCSS bool `json:",omitempty"`
|
SkinnyCSS bool `json:",omitempty"`
|
||||||
|
Avatar string `json:",omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type KeyInfo struct {
|
type KeyInfo struct {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue