diff options
author | 2022-09-04 14:41:42 +0200 | |
---|---|---|
committer | 2022-09-04 14:41:42 +0200 | |
commit | 006c8b604b88fdddf1a2319e44aa37dd8777efd9 (patch) | |
tree | d1562a40f437005031405525a51a8003c2fd39d7 /internal/web/profile.go | |
parent | [bugfix] Fix status fields `in_reply_to_id` and `in_reply_to_account_id` not ... (diff) | |
download | gotosocial-006c8b604b88fdddf1a2319e44aa37dd8777efd9.tar.xz |
[feature] Set default header and avatar for API accounts to GtS ones (#799)
* validate web-asset-base-dir
* move default icons into converter
* always ensure avatar + header on api accounts
* update tests
* add default header
* don't return error from web module creation anymore
* tidy a bit
* use pngs for default avatars rather than svgs
Diffstat (limited to 'internal/web/profile.go')
-rw-r--r-- | internal/web/profile.go | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/internal/web/profile.go b/internal/web/profile.go index 542c015f1..61f7c57e7 100644 --- a/internal/web/profile.go +++ b/internal/web/profile.go @@ -23,7 +23,6 @@ import ( "encoding/json" "errors" "fmt" - "math/rand" "net/http" "strings" @@ -100,21 +99,6 @@ func (m *Module) profileGETHandler(c *gin.Context) { return } - // pick a random dummy avatar if this account avatar isn't set yet - if account.Avatar == "" && len(m.defaultAvatars) > 0 { - //nolint:gosec - randomIndex := rand.Intn(len(m.defaultAvatars)) - dummyAvatar := m.defaultAvatars[randomIndex] - account.Avatar = dummyAvatar - for _, i := range statusResp.Items { - s, ok := i.(*apimodel.Status) - if !ok { - panic("timelineable was not *apimodel.Status") - } - s.Account.Avatar = dummyAvatar - } - } - c.HTML(http.StatusOK, "profile.tmpl", gin.H{ "instance": instance, "account": account, |