diff --git a/services/appflowy-collaborate/src/group/group_init.rs b/services/appflowy-collaborate/src/group/group_init.rs index 2d90ff0a..09f4751a 100644 --- a/services/appflowy-collaborate/src/group/group_init.rs +++ b/services/appflowy-collaborate/src/group/group_init.rs @@ -1158,7 +1158,7 @@ impl CollabPersister { async fn embeddings(&self, collab: &Collab) -> Result, AppError> { if let Some(indexer) = self.indexer.clone() { - let params = indexer.embedding_params(collab)?; + let params = indexer.embedding_params(collab).await?; let embeddings = indexer.embeddings(params).await?; Ok(embeddings) } else { diff --git a/services/appflowy-collaborate/src/group/manager.rs b/services/appflowy-collaborate/src/group/manager.rs index 9effb7f2..e547587a 100644 --- a/services/appflowy-collaborate/src/group/manager.rs +++ b/services/appflowy-collaborate/src/group/manager.rs @@ -123,8 +123,7 @@ where object_id: &str, collab_type: CollabType, ) -> Result<(), RealtimeError> { - let mut is_new_collab = false; - let params = QueryCollabParams::new(object_id, collab_type.clone(), workspace_id); + let mut is_new_collab = true; // Ensure the workspace_id matches the metadata's workspace_id when creating a collaboration object // of type [CollabType::Folder]. In this case, both the object id and the workspace id should be // identical. @@ -145,6 +144,7 @@ where }); return Err(err); } + is_new_collab = false; } trace!(