fix: 修正聊天ID和用户ID的属性名称,修复数据库用户信息获取逻辑
This commit is contained in:
parent
33f6e5f00d
commit
8c42f639ba
@ -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}`
|
||||
)
|
||||
}
|
||||
}
|
||||
|
@ -34,7 +34,7 @@ const create = async (user: User) =>
|
||||
*/
|
||||
const getByUserId = async (userId: string) =>
|
||||
managePbError<UserModel>(() =>
|
||||
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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user