diff --git a/controller/groupAgent/report.ts b/controller/groupAgent/report.ts index 37a7ff9..707bea5 100644 --- a/controller/groupAgent/report.ts +++ b/controller/groupAgent/report.ts @@ -90,7 +90,7 @@ const genReport = async ( }) } catch (error: any) { logger.error( - `Failed to summarize chat ${subscription.chat_id}: ${error.message}` + `Failed to summarize chat ${subscription.chatId}: ${error.message}` ) } } diff --git a/db/user/index.ts b/db/user/index.ts index 48106ca..8e08470 100644 --- a/db/user/index.ts +++ b/db/user/index.ts @@ -34,7 +34,7 @@ const create = async (user: User) => */ const getByUserId = async (userId: string) => managePbError(() => - pbClient.collection("user").getFirstListItem(`user_id = "${userId}"`) + pbClient.collection("user").getFirstListItem(`userId = "${userId}"`) ) /** @@ -49,7 +49,7 @@ const getByCtx = async ({ larkBody, larkService }: Context) => { if (user) return user // 如果数据库中没有用户信息,从larkService获取用户信息 const userInfo = await larkService.user.getOne(larkBody.userId, "user_id") - if (userInfo.code !== 0) return null + if (userInfo.code === 0) return null // 解构用户信息 const { user_id,