diff --git a/apps/common/job/clean_chat_job.py b/apps/common/job/clean_chat_job.py index 778b8a8dc..347f1a8a8 100644 --- a/apps/common/job/clean_chat_job.py +++ b/apps/common/job/clean_chat_job.py @@ -58,6 +58,6 @@ def run(): existing_job = scheduler.get_job(job_id='clean_chat_log') if existing_job is not None: existing_job.remove() - scheduler.add_job(clean_chat_log_job, 'cron', minute='*/5', id='clean_chat_log') + scheduler.add_job(clean_chat_log_job, 'cron', hour='0', minute='5', id='clean_chat_log') finally: lock.un_lock('clean_chat_log_job') diff --git a/ui/src/views/authentication/component/EditModal.vue b/ui/src/views/authentication/component/EditModal.vue index 8ea3afaa1..01259e6ab 100644 --- a/ui/src/views/authentication/component/EditModal.vue +++ b/ui/src/views/authentication/component/EditModal.vue @@ -125,7 +125,12 @@ const open = async (platform: Platform) => { currentPlatform.config.corp_id = currentPlatform.config.agent_id delete currentPlatform.config.agent_id } - currentPlatform.config.callback_url = defaultCallbackUrl + currentPlatform.config = { + corp_id: currentPlatform.config.corp_id, + app_key: currentPlatform.config.app_key, + app_secret: currentPlatform.config.app_secret, + callback_url: defaultCallbackUrl + } break case 'lark': currentPlatform.config.callback_url = `${defaultCallbackUrl}/api/feishu` diff --git a/ui/src/views/authentication/component/SCAN.vue b/ui/src/views/authentication/component/SCAN.vue index d0ccead29..f4a48f157 100644 --- a/ui/src/views/authentication/component/SCAN.vue +++ b/ui/src/views/authentication/component/SCAN.vue @@ -131,7 +131,6 @@ function createPlatform(key: string, name: string): Platform { const config = { ...(key === 'wecom' ? { corp_id: '', agent_id: '' } : { app_key: '' }), - ...(key === 'dingtalk' ? { corp_id: '' } : {}), app_secret: '', callback_url: '' } @@ -172,6 +171,15 @@ function getPlatformInfo() { isActive: data.is_active, config: data.config }) + if (platform.key === 'dingtalk') { + const { corp_id, app_key, app_secret } = platform.config + platform.config = { + corp_id, + app_key, + app_secret, + callback_url: platform.config.callback_url + } + } showPassword[platform.key] = {} showPassword[platform.key]['app_secret'] = false }