feat(settings): add synced user assets
This commit is contained in:
parent
3685babebf
commit
01f1834e25
24 changed files with 959 additions and 50 deletions
|
|
@ -12,7 +12,7 @@ iota-logger = { path = "../iota-logger" }
|
|||
iota-state = { path = "../iota-state" }
|
||||
iota-storage = { path = "../iota-storage" }
|
||||
iota-util = { path = "../iota-util" }
|
||||
mtp = { git = "https://git.methanium.net/Methanium/mtp.git", rev = "1f19a0d897c265d1e3f590a876f95e766ff99318", features = [
|
||||
mtp = { git = "https://git.methanium.net/Methanium/mtp.git", rev = "bb0f682b735de5ebb36bb41dc699260578341828", features = [
|
||||
"client",
|
||||
"crypto",
|
||||
"files",
|
||||
|
|
|
|||
|
|
@ -1730,6 +1730,14 @@ impl OmikronConnection {
|
|||
dispatch!(UserBlobGet, handle_user_blob_get);
|
||||
dispatch!(UserBlobDelete, handle_user_blob_delete);
|
||||
dispatch!(UserBlobList, handle_user_blob_list);
|
||||
dispatch!(UserAssetUploadStart, handle_user_asset_upload_start);
|
||||
dispatch!(UserAssetUploadChunk, handle_user_asset_upload_chunk);
|
||||
dispatch!(UserAssetUploadStatus, handle_user_asset_upload_status);
|
||||
dispatch!(UserAssetUploadCommit, handle_user_asset_upload_commit);
|
||||
dispatch!(UserAssetUploadAbort, handle_user_asset_upload_abort);
|
||||
dispatch!(UserAssetGetChunk, handle_user_asset_get_chunk);
|
||||
dispatch!(UserAssetList, handle_user_asset_list);
|
||||
dispatch!(UserAssetDelete, handle_user_asset_delete);
|
||||
dispatch!(UserBlock, handle_user_block);
|
||||
dispatch!(UserUnblock, handle_user_unblock);
|
||||
dispatch!(BlockedUsersGet, handle_blocked_users_get);
|
||||
|
|
@ -2905,6 +2913,58 @@ impl OmikronConnection {
|
|||
.await;
|
||||
}
|
||||
|
||||
async fn handle_user_asset_upload_start(self: Arc<Self>, cv: &CommunicationValue) {
|
||||
let _ = self
|
||||
.send_message(&message_handlers::handle_user_asset_upload_start(cv))
|
||||
.await;
|
||||
}
|
||||
|
||||
async fn handle_user_asset_upload_chunk(self: Arc<Self>, cv: &CommunicationValue) {
|
||||
let _ = self
|
||||
.send_message(&message_handlers::handle_user_asset_upload_chunk(cv))
|
||||
.await;
|
||||
}
|
||||
|
||||
async fn handle_user_asset_upload_status(self: Arc<Self>, cv: &CommunicationValue) {
|
||||
let _ = self
|
||||
.send_message(&message_handlers::handle_user_asset_upload_status(cv))
|
||||
.await;
|
||||
}
|
||||
|
||||
async fn handle_user_asset_upload_commit(self: Arc<Self>, cv: &CommunicationValue) {
|
||||
let mutation = message_handlers::handle_user_asset_upload_commit(cv);
|
||||
let _ = self.send_message(&mutation.response).await;
|
||||
if let Some(changed) = mutation.changed {
|
||||
let _ = self.send_message(&changed).await;
|
||||
}
|
||||
}
|
||||
|
||||
async fn handle_user_asset_upload_abort(self: Arc<Self>, cv: &CommunicationValue) {
|
||||
let _ = self
|
||||
.send_message(&message_handlers::handle_user_asset_upload_abort(cv))
|
||||
.await;
|
||||
}
|
||||
|
||||
async fn handle_user_asset_get_chunk(self: Arc<Self>, cv: &CommunicationValue) {
|
||||
let _ = self
|
||||
.send_message(&message_handlers::handle_user_asset_get_chunk(cv))
|
||||
.await;
|
||||
}
|
||||
|
||||
async fn handle_user_asset_list(self: Arc<Self>, cv: &CommunicationValue) {
|
||||
let _ = self
|
||||
.send_message(&message_handlers::handle_user_asset_list(cv))
|
||||
.await;
|
||||
}
|
||||
|
||||
async fn handle_user_asset_delete(self: Arc<Self>, cv: &CommunicationValue) {
|
||||
let mutation = message_handlers::handle_user_asset_delete(cv);
|
||||
let _ = self.send_message(&mutation.response).await;
|
||||
if let Some(changed) = mutation.changed {
|
||||
let _ = self.send_message(&changed).await;
|
||||
}
|
||||
}
|
||||
|
||||
async fn handle_user_block(self: Arc<Self>, cv: &CommunicationValue) {
|
||||
let mutation = message_handlers::handle_user_block(cv);
|
||||
let _ = self.send_message(&mutation.response).await;
|
||||
|
|
|
|||
Loading…
Reference in a new issue