perf: request quantity;perf: share page error circulation;perf: share chat toast (#3763)

* model config

* feat: normalization embedding

* perf: share page error circulation

* perf: request quantity

* perf: share chat toast

* perf: queue
This commit is contained in:
Archer
2025-02-12 11:36:29 +08:00
committed by GitHub
parent 116936ffa9
commit 58f715e878
16 changed files with 132 additions and 159 deletions

View File

@@ -63,8 +63,8 @@ export async function authChatCrud({
authType: AuthUserTypeEnum.teamDomain
};
const chat = await MongoChat.findOne({ appId, chatId, outLinkUid: uid }).lean();
if (!chat)
const chat = await MongoChat.findOne({ appId, chatId }).lean();
if (!chat) {
return {
teamId: spaceTeamId,
tmbId,
@@ -72,6 +72,9 @@ export async function authChatCrud({
...defaultResponseShow,
authType: AuthUserTypeEnum.teamDomain
};
}
if (chat.outLinkUid !== uid) return Promise.reject(ChatErrEnum.unAuthChat);
return {
teamId: spaceTeamId,
@@ -104,7 +107,8 @@ export async function authChatCrud({
};
}
const chat = await MongoChat.findOne({ appId, chatId, outLinkUid: uid }).lean();
const chat = await MongoChat.findOne({ appId, chatId }).lean();
if (!chat) {
return {
teamId: String(outLinkConfig.teamId),
@@ -116,6 +120,7 @@ export async function authChatCrud({
authType: AuthUserTypeEnum.outLink
};
}
if (chat.outLinkUid !== uid) return Promise.reject(ChatErrEnum.unAuthChat);
return {
teamId: String(outLinkConfig.teamId),
tmbId: String(outLinkConfig.tmbId),