Bring projects, wikis, and teams together with AI. AppFlowy is the AI collaborative workspace where you achieve more without losing control of your data. The leading open source Notion alternative.
Dart blogconfluence-alternativecontent-managementcontent-servicesdocumentationflutternote-takingnotion-alternativeproject-managementtask-managementteam-collaborationwiki
chore: fix test
Nathan2c6253576f3d
diff --git a/frontend/rust-lib/flowy-user/src/user_manager/manager.rs b/frontend/rust-lib/flowy-user/src/user_manager/manager.rsindex b781421be4..f3e9578e57 100644--- a/frontend/rust-lib/flowy-user/src/user_manager/manager.rs+++ b/frontend/rust-lib/flowy-user/src/user_manager/manager.rs@@ -804,7 +804,7 @@ pub fn upsert_user_profile_change();update_user_profile(&mut conn, changeset)?;let user = select_user_profile(uid, workspace_id, &mut conn)?;- send_notification(&uid.to_string(), UserNotification::DidUpdateUserProfile)+ send_notification(uid, UserNotification::DidUpdateUserProfile).payload(UserProfilePB::from(user)).send();Ok(())diff --git a/frontend/rust-lib/flowy-user/src/user_manager/manager_user_awareness.rs b/frontend/rust-lib/flowy-user/src/user_manager/manager_user_awareness.rsindex c055b95041..aa6311c841 100644--- a/frontend/rust-lib/flowy-user/src/user_manager/manager_user_awareness.rs+++ b/frontend/rust-lib/flowy-user/src/user_manager/manager_user_awareness.rs@@ -292,10 +292,7 @@ impl UserManager {match create_awareness {Ok(new_user_awareness) => {user_awareness.insert(workspace_id, new_user_awareness);- send_notification(- &workspace_id.to_string(),- UserNotification::DidLoadUserAwareness,- );+ send_notification(workspace_id, UserNotification::DidLoadUserAwareness);set_is_loading_false();Ok(())diff --git a/frontend/rust-lib/flowy-user/src/user_manager/manager_user_workspace.rs b/frontend/rust-lib/flowy-user/src/user_manager/manager_user_workspace.rsindex 75549e85b3..e69dab9f76 100644--- a/frontend/rust-lib/flowy-user/src/user_manager/manager_user_workspace.rs+++ b/frontend/rust-lib/flowy-user/src/user_manager/manager_user_workspace.rs@@ -270,7 +270,7 @@ impl UserManager {let row = self.get_user_workspace_from_db(uid, workspace_id)?;let payload = UserWorkspacePB::from(row);- send_notification(&uid.to_string(), UserNotification::DidUpdateUserWorkspace)+ send_notification(uid, UserNotification::DidUpdateUserWorkspace).payload(payload).send();@@ -460,7 +460,7 @@ impl UserManager {// only send notification if there were real changesif let Ok(updated_list) = select_all_user_workspace(uid, &mut conn) {let repeated_pb = RepeatedUserWorkspacePB::from(updated_list);- send_notification(&uid.to_string(), UserNotification::DidUpdateUserWorkspaces)+ send_notification(uid, UserNotification::DidUpdateUserWorkspaces).payload(repeated_pb).send();}@@ -609,12 +609,9 @@ impl UserManager {update_workspace_setting(&mut conn, changeset)?;let pb = WorkspaceSettingsPB::from(&settings);- send_notification(- &uid.to_string(),- UserNotification::DidUpdateWorkspaceSetting,- )- .payload(pb)- .send();+ send_notification(uid, UserNotification::DidUpdateWorkspaceSetting)+ .payload(pb)+ .send();Ok(())}@@ -767,12 +764,9 @@ async fn sync_workspace_settings(let new_pb = WorkspaceSettingsPB::from(&settings);if new_pb != old_pb {trace!("workspace settings updated");- send_notification(- &uid.to_string(),- UserNotification::DidUpdateWorkspaceSetting,- )- .payload(new_pb)- .send();+ send_notification(uid, UserNotification::DidUpdateWorkspaceSetting)+ .payload(new_pb)+ .send();if let Ok(mut conn) = pool.get() {upsert_workspace_setting(&mut conn,