This is an automated email from the ASF dual-hosted git repository.

kumfo pushed a commit to branch test
in repository https://gitbox.apache.org/repos/asf/incubator-answer.git

commit 1b043d3a64fc6f7f9b30ee1e735bd7d37a4492ff
Author: sy-records <[email protected]>
AuthorDate: Tue Aug 6 15:39:55 2024 +0800

    fix: branding favicon might be empty
---
 internal/controller/template_render/question.go | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/internal/controller/template_render/question.go 
b/internal/controller/template_render/question.go
index 83d08dc7..b9753618 100644
--- a/internal/controller/template_render/question.go
+++ b/internal/controller/template_render/question.go
@@ -96,9 +96,9 @@ func (t *TemplateRenderController) OpenSearch(ctx 
*gin.Context) {
                return
        }
 
-       favicon := "favicon.ico"
+       favicon := general.SiteUrl + "/favicon.ico"
        branding, err := t.siteInfoService.GetSiteBranding(ctx)
-       if err == nil {
+       if err == nil && len(branding.Favicon) > 0 {
                favicon = branding.Favicon
        }
 

Reply via email to