mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
chore: fix user awareness fetch (#5048)
* chore: fix user awareness fetch * chore: update * chore: update
This commit is contained in:
@ -212,7 +212,12 @@ pub trait UserCloudService: Send + Sync + 'static {
|
||||
FutureResult::new(async { Ok(vec![]) })
|
||||
}
|
||||
|
||||
fn get_user_awareness_doc_state(&self, uid: i64) -> FutureResult<Vec<u8>, FlowyError>;
|
||||
fn get_user_awareness_doc_state(
|
||||
&self,
|
||||
uid: i64,
|
||||
workspace_id: &str,
|
||||
object_id: &str,
|
||||
) -> FutureResult<Vec<u8>, FlowyError>;
|
||||
|
||||
fn receive_realtime_event(&self, _json: Value) {}
|
||||
|
||||
|
@ -396,6 +396,10 @@ pub struct WorkspaceMember {
|
||||
pub name: String,
|
||||
}
|
||||
|
||||
pub fn awareness_oid_from_user_uuid(user_uuid: &Uuid) -> Uuid {
|
||||
Uuid::new_v5(user_uuid, b"user_awareness")
|
||||
/// represent the user awareness object id for the workspace.
|
||||
pub fn user_awareness_object_id(user_uuid: &Uuid, workspace_id: &str) -> Uuid {
|
||||
Uuid::new_v5(
|
||||
user_uuid,
|
||||
format!("user_awareness:{}", workspace_id).as_bytes(),
|
||||
)
|
||||
}
|
||||
|
Reference in New Issue
Block a user