Skip to content

Commit

Permalink
Fix bug of DisableGravatar default value (#22296)
Browse files Browse the repository at this point in the history
#18058 made a mistake. The disableGravatar's default value depends on
`OfflineMode`. If it's `true`, then `disableGravatar` is true, otherwise
it's `false`. But not opposite.

Co-authored-by: KN4CK3R <[email protected]>
  • Loading branch information
lunny and KN4CK3R authored Jan 1, 2023
1 parent 2bbf9e7 commit 9c8fc7f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion models/system/setting.go
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ func Init() error {
enableFederatedAvatar = false
}

if disableGravatar || !enableFederatedAvatar {
if enableFederatedAvatar || !disableGravatar {
var err error
GravatarSourceURL, err = url.Parse(setting.GravatarSource)
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion modules/setting/picture.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ func newPictureService() {
}

func GetDefaultDisableGravatar() bool {
return !OfflineMode
return OfflineMode
}

func GetDefaultEnableFederatedAvatar(disableGravatar bool) bool {
Expand Down

0 comments on commit 9c8fc7f

Please sign in to comment.