feat: add ability to share chats (#594)
This commit is contained in:
parent
64d1aad2bb
commit
4d901ba066
20 changed files with 877 additions and 66 deletions
|
|
@ -309,3 +309,18 @@ export async function deleteMessagesByChatIdAfterTimestamp({
|
|||
throw error;
|
||||
}
|
||||
}
|
||||
|
||||
export async function updateChatVisiblityById({
|
||||
chatId,
|
||||
visibility,
|
||||
}: {
|
||||
chatId: string;
|
||||
visibility: 'private' | 'public';
|
||||
}) {
|
||||
try {
|
||||
return await db.update(chat).set({ visibility }).where(eq(chat.id, chatId));
|
||||
} catch (error) {
|
||||
console.error('Failed to update chat visibility in database');
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue