Skip to content

Commit

Permalink
chore: update yrs and appflowy collab
Browse files Browse the repository at this point in the history
  • Loading branch information
Horusiath committed Aug 27, 2024
1 parent fee2c37 commit 1000e29
Show file tree
Hide file tree
Showing 3 changed files with 63 additions and 30 deletions.
71 changes: 51 additions & 20 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ pgvector = { version = "0.4", features = ["sqlx"] }
client-api-entity = { path = "libs/client-api-entity" }

# collaboration
yrs = { version = "0.19.2", features = ["sync"] }
yrs = { version = "0.21.0", features = ["sync"] }
collab = { version = "0.2.0" }
collab-entity = { version = "0.2.0" }
collab-folder = { version = "0.2.0" }
Expand All @@ -283,11 +283,11 @@ debug = true
[patch.crates-io]
# It's diffcult to resovle different version with the same crate used in AppFlowy Frontend and the Client-API crate.
# So using patch to workaround this issue.
collab = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "ec4f92941942f20c84dce142cd2eeafd44ca7362" }
collab-entity = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "ec4f92941942f20c84dce142cd2eeafd44ca7362" }
collab-folder = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "ec4f92941942f20c84dce142cd2eeafd44ca7362" }
collab-document = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "ec4f92941942f20c84dce142cd2eeafd44ca7362" }
collab-user = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "ec4f92941942f20c84dce142cd2eeafd44ca7362" }
collab = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "cf5c871191e5fbbaa58af5ab7cb037f792e28297" }
collab-entity = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "cf5c871191e5fbbaa58af5ab7cb037f792e28297" }
collab-folder = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "cf5c871191e5fbbaa58af5ab7cb037f792e28297" }
collab-document = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "cf5c871191e5fbbaa58af5ab7cb037f792e28297" }
collab-user = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "cf5c871191e5fbbaa58af5ab7cb037f792e28297" }

[features]
history = []
Expand Down
10 changes: 6 additions & 4 deletions libs/client-api-test/src/test_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -132,11 +132,13 @@ impl TestClient {
let collab = (*lock).borrow();
collab
.get_awareness()
.clients()
.iter()
.map(|(_a, json)| {
let user: UserId = serde_json::from_str(json).unwrap();
user.uid
.flat_map(|(_a, client)| match &client.data {
None => None,
Some(json) => {
let user: UserId = serde_json::from_str(json).unwrap();
Some(user.uid)
},
})
.collect()
}
Expand Down

0 comments on commit 1000e29

Please sign in to comment.