Merge pull request #8286 from srajangarg/sg

feat: functionality to clone shared chats
This commit is contained in:
Timothy Jaeryang Baek
2025-01-05 00:45:55 -08:00
committed by GitHub
5 changed files with 111 additions and 17 deletions

View File

@@ -469,6 +469,8 @@ class ChatTable:
def get_chat_by_share_id(self, id: str) -> Optional[ChatModel]:
try:
with get_db() as db:
# it is possible that the shared link was deleted. hence,
# we check if the chat is still shared by checkng if a chat with the share_id exists
chat = db.query(Chat).filter_by(share_id=id).first()
if chat: