From 0cca1e079baac04b06850a40a0d8438e25031afc Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Wed, 4 Jan 2023 21:17:59 +0800 Subject: [PATCH] fix gravatar disable bug (#22337) --- 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 7b18ad828..c801f9cc1 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)