diff --git a/apiserver/pkg/chat/chat_server.go b/apiserver/pkg/chat/chat_server.go index 7a89b31a5..4fec672e6 100644 --- a/apiserver/pkg/chat/chat_server.go +++ b/apiserver/pkg/chat/chat_server.go @@ -432,7 +432,10 @@ func (cs *ChatServer) FillAppIconToConversations(ctx context.Context, conversati } err := cs.cli.Get(ctx, types.NamespacedName{Namespace: ns, Name: name}, app) if err != nil { - return err + // FIXME: Currently, there is a request for an application that cannot be found in a conversation in the database, + // causing other conversations to be unable to add icons, so an error is encountered here and no error is returned. + klog.Errorf("failed to get application %s in namespace %s, error %s", name, ns, err) + return nil } result[index] = app.Spec.Icon return nil diff --git a/apiserver/pkg/chat/storage/storage.go b/apiserver/pkg/chat/storage/storage.go index 40092b4df..d58362b39 100644 --- a/apiserver/pkg/chat/storage/storage.go +++ b/apiserver/pkg/chat/storage/storage.go @@ -42,7 +42,7 @@ type Conversation struct { Debug bool `gorm:"column:debug;type:bool;comment:debug mode" json:"-"` DeletedAt gorm.DeletedAt `gorm:"column:deleted_at;type:time;comment:the time the conversation deleted at" json:"-"` // icon only valid in conversation list api - Icon string `gorm:"-" json:"icon,omitempty"` + Icon string `gorm:"-" json:"icon"` } // Message represent a message in storage