File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -401,6 +401,15 @@ func (u *AppUsecase) GetAppDetailByKBIDAndAppType(ctx context.Context, kbID stri
401
401
appDetailResp .Settings .AIFeedbackSettings .AIFeedbackType = []string {"内容不准确" , "没有帮助" , "其他" }
402
402
}
403
403
404
+ // default enable captcha
405
+ if app .Settings .CaptchaSettings .ChatStatus == "" {
406
+ app .Settings .CaptchaSettings .ChatStatus = consts .CaptchaStatusEnable
407
+ }
408
+ if app .Settings .CaptchaSettings .CommentStatus == "" {
409
+ app .Settings .CaptchaSettings .CommentStatus = consts .CaptchaStatusEnable
410
+ }
411
+
412
+ // get recommend nodes
404
413
if len (app .Settings .RecommendNodeIDs ) > 0 {
405
414
nodes , err := u .nodeUsecase .GetRecommendNodeList (ctx , & domain.GetRecommendNodeListReq {
406
415
KBID : kbID ,
@@ -461,6 +470,13 @@ func (u *AppUsecase) GetWebAppInfo(ctx context.Context, kbID string) (*domain.Ap
461
470
if app .Settings .AIFeedbackSettings .AIFeedbackType == nil {
462
471
appInfo .Settings .AIFeedbackSettings .AIFeedbackType = []string {"内容不准确" , "没有帮助" , "其他" }
463
472
}
473
+ // default enable captcha
474
+ if app .Settings .CaptchaSettings .ChatStatus == "" {
475
+ app .Settings .CaptchaSettings .ChatStatus = consts .CaptchaStatusEnable
476
+ }
477
+ if app .Settings .CaptchaSettings .CommentStatus == "" {
478
+ app .Settings .CaptchaSettings .CommentStatus = consts .CaptchaStatusEnable
479
+ }
464
480
465
481
return appInfo , nil
466
482
}
You can’t perform that action at this time.
0 commit comments