Implement sync source-only mode in ServeSession and ChangeBatcher

- Added support for a new sync mode in ServeSession that filters property changes to only include the Source property when the server indicates it is in source-only mode.
- Updated ChangeBatcher to handle the new syncSourceOnly parameter, ensuring that only relevant property changes are processed based on the server's capabilities.
- Enhanced API response to include sync_source_only flag, indicating the server's sync capabilities.
- Adjusted related functions to accommodate the new sync logic, improving data synchronization efficiency.
This commit is contained in:
Joe 2026-01-24 05:24:08 -06:00
parent 8650cdbd82
commit b30aa8280d
6 changed files with 52 additions and 8 deletions

View file

@ -165,6 +165,10 @@ pub struct ServerInfoResponse {
pub game_id: Option<u64>,
pub place_id: Option<u64>,
pub root_instance_id: Ref,
/// When true, the server only supports syncing script Source property changes.
/// Other property changes will be ignored.
#[serde(default)]
pub sync_source_only: bool,
}
/// Response body from /api/read/{id}