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 7b18ad828a..c801f9cc1c 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) -- 2.39.5