Remove hard timeouts and fallback paths in chat flow
This commit is contained in:
@@ -232,16 +232,6 @@ async function archiveChatConversation(auth: AuthContext | null, event: H3Event,
|
||||
return ctx.conversationId;
|
||||
}
|
||||
|
||||
const fallback = await tx.chatConversation.findFirst({
|
||||
where: { teamId: ctx.teamId, createdByUserId: ctx.userId },
|
||||
orderBy: { updatedAt: "desc" },
|
||||
select: { id: true },
|
||||
});
|
||||
|
||||
if (fallback) {
|
||||
return fallback.id;
|
||||
}
|
||||
|
||||
const created = await tx.chatConversation.create({
|
||||
data: { teamId: ctx.teamId, createdByUserId: ctx.userId, title: "Pilot" },
|
||||
select: { id: true },
|
||||
|
||||
Reference in New Issue
Block a user