This commit is contained in:
2026-04-30 17:49:07 +08:00
parent 805d6f8cae
commit 9d684cb7b3
615 changed files with 15368 additions and 6172 deletions

View File

@@ -1,6 +1,7 @@
use super::*;
use crate::mapper::*;
use crate::module_bindings::delete_custom_world_agent_session_procedure::delete_custom_world_agent_session;
use crate::module_bindings::record_custom_world_profile_like_procedure::record_custom_world_profile_like;
use crate::module_bindings::record_custom_world_profile_play_procedure::record_custom_world_profile_play;
use crate::module_bindings::remix_custom_world_profile_procedure::remix_custom_world_profile;
@@ -261,6 +262,30 @@ impl SpacetimeClient {
.await
}
pub async fn record_custom_world_profile_like(
&self,
input: CustomWorldProfileLikeReportRecordInput,
) -> Result<CustomWorldLibraryMutationRecord, SpacetimeClientError> {
let procedure_input = CustomWorldProfileLikeRecordInput {
owner_user_id: input.owner_user_id,
profile_id: input.profile_id,
user_id: input.user_id,
liked_at_micros: input.liked_at_micros,
};
self.call_after_connect(move |connection, sender| {
connection
.procedures()
.record_custom_world_profile_like_then(procedure_input, move |_, result| {
let mapped = result
.map_err(|error| SpacetimeClientError::Procedure(error.to_string()))
.and_then(map_custom_world_library_mutation_result);
send_once(&sender, mapped);
});
})
.await
}
pub async fn publish_custom_world_world(
&self,
input: CustomWorldPublishWorldRecordInput,