mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
chore: check workspace id before write to disk (#5197)
* chore: check workspace id before write to disk * chore: update logs * chore: update logs * chore: update ci * chore: bump client api
This commit is contained in:
@ -95,6 +95,9 @@ pub(crate) async fn apply_action_handler(
|
||||
let doc_id = params.document_id;
|
||||
let document = manager.get_document(&doc_id).await?;
|
||||
let actions = params.actions;
|
||||
if cfg!(feature = "verbose_log") {
|
||||
tracing::trace!("{} applying actions: {:?}", doc_id, actions);
|
||||
}
|
||||
document.lock().apply_action(actions);
|
||||
Ok(())
|
||||
}
|
||||
@ -125,6 +128,9 @@ pub(crate) async fn apply_text_delta_handler(
|
||||
let text_id = params.text_id;
|
||||
let delta = params.delta;
|
||||
let document = document.lock();
|
||||
if cfg!(feature = "verbose_log") {
|
||||
tracing::trace!("{} applying delta: {:?}", doc_id, delta);
|
||||
}
|
||||
document.apply_text_delta(&text_id, delta);
|
||||
Ok(())
|
||||
}
|
||||
|
@ -2,8 +2,8 @@ use std::sync::Arc;
|
||||
use std::sync::Weak;
|
||||
|
||||
use collab::core::collab::{DataSource, MutexCollab};
|
||||
use collab::core::collab_plugin::EncodedCollab;
|
||||
use collab::core::origin::CollabOrigin;
|
||||
use collab::entity::EncodedCollab;
|
||||
use collab::preclude::Collab;
|
||||
use collab_document::blocks::DocumentData;
|
||||
use collab_document::document::Document;
|
||||
|
Reference in New Issue
Block a user