Skip to content

Commit 9c8fc7f

Browse files
lunnyKN4CK3R
andauthored
Fix bug of DisableGravatar default value (#22296)
#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]>
1 parent 2bbf9e7 commit 9c8fc7f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

models/system/setting.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ func Init() error {
266266
enableFederatedAvatar = false
267267
}
268268

269-
if disableGravatar || !enableFederatedAvatar {
269+
if enableFederatedAvatar || !disableGravatar {
270270
var err error
271271
GravatarSourceURL, err = url.Parse(setting.GravatarSource)
272272
if err != nil {

modules/setting/picture.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ func newPictureService() {
6868
}
6969

7070
func GetDefaultDisableGravatar() bool {
71-
return !OfflineMode
71+
return OfflineMode
7272
}
7373

7474
func GetDefaultEnableFederatedAvatar(disableGravatar bool) bool {

0 commit comments

Comments
 (0)