read avatar option from db
Ted Unangst tedu@tedunangst.com
Wed, 06 Nov 2019 21:33:13 -0500
2 files changed,
7 insertions(+),
2 deletions(-)
M
activity.go
→
activity.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"