fix gravatar disable bug (#22337)

This commit is contained in:
Lunny Xiao 2023-01-04 21:17:59 +08:00 committed by GitHub
parent 55c6433fac
commit 0cca1e079b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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)