From 5a003612076c5c1b2d1aa94766cdf3d89dce1278 Mon Sep 17 00:00:00 2001 From: nathan Date: Tue, 2 Apr 2024 12:57:26 +0800 Subject: [PATCH] chore: remove doc state check that download from remote --- .../rust-lib/collab-integrate/src/collab_builder.rs | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/frontend/rust-lib/collab-integrate/src/collab_builder.rs b/frontend/rust-lib/collab-integrate/src/collab_builder.rs index 7d7f967d24..d29ba8452e 100644 --- a/frontend/rust-lib/collab-integrate/src/collab_builder.rs +++ b/frontend/rust-lib/collab-integrate/src/collab_builder.rs @@ -208,23 +208,11 @@ impl AppFlowyCollabBuilder { #[allow(unused_variables)] persistence_config: CollabPersistenceConfig, build_config: CollabBuilderConfig, ) -> Result, Error> { - let is_from_doc_state = matches!(collab_doc_state, DocStateSource::FromDocState(_)); let collab = CollabBuilder::new(uid, object_id) .with_doc_state(collab_doc_state) .with_device_id(self.device_id.clone()) .build()?; - // If the object is from doc state, we need to validate the object type - if is_from_doc_state { - if let Err(err) = object_type.validate(&collab.lock()) { - error!( - "{:?} validation failed: {}, object_id: {}", - object_type, err, object_id - ); - return Err(err); - } - } - #[cfg(target_arch = "wasm32")] { collab.lock().add_plugin(Box::new(IndexeddbDiskPlugin::new(