From 6e362fc4fcaca3b0c87ffba9b16219d2a9c51f04 Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Wed, 4 Jan 2023 15:32:19 +0800 Subject: [PATCH] fix gravatar disable bug --- models/system/setting.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/models/system/setting.go b/models/system/setting.go index 7b18ad828a159..c801f9cc1c7ed 100644 --- a/models/system/setting.go +++ b/models/system/setting.go @@ -276,7 +276,7 @@ func Init() error { } } - if enableFederatedAvatarSetting.GetValueBool() { + if GravatarSourceURL != nil && enableFederatedAvatarSetting.GetValueBool() { LibravatarService = libravatar.New() if GravatarSourceURL.Scheme == "https" { LibravatarService.SetUseHTTPS(true)