diff --git a/surfsense_backend/app/celery_app.py b/surfsense_backend/app/celery_app.py index f7bea8cc3..b4869d23f 100644 --- a/surfsense_backend/app/celery_app.py +++ b/surfsense_backend/app/celery_app.py @@ -65,6 +65,7 @@ celery_app = Celery( "app.tasks.celery_tasks.schedule_checker_task", "app.tasks.celery_tasks.blocknote_migration_tasks", "app.tasks.celery_tasks.document_reindex_tasks", + "app.tasks.celery_tasks.clone_chat_tasks", ], ) diff --git a/surfsense_backend/app/services/public_chat_service.py b/surfsense_backend/app/services/public_chat_service.py index 62fd4f923..85f1a9572 100644 --- a/surfsense_backend/app/services/public_chat_service.py +++ b/surfsense_backend/app/services/public_chat_service.py @@ -253,6 +253,7 @@ async def clone_public_chat( Clone a public chat to user's account. Creates a new private thread with all messages and podcasts. + Citations are stripped since they reference the original user's documents. """ import copy @@ -291,7 +292,7 @@ async def clone_public_chat( podcast_id_map: dict[int, int] = {} for msg in sorted(source_thread.messages, key=lambda m: m.created_at): - new_content = copy.deepcopy(msg.content) + new_content = sanitize_content_for_public(msg.content) if isinstance(new_content, list): for part in new_content: