feat: add server time to obsidian connect responses and enhance error handling

- Included server_time_utc in the connect response schema for better synchronization.
- Updated obsidian_connect function to set server_time_utc during connection handling.
- Enhanced integration tests to verify the presence of server_time_utc in responses.
- Improved connectivity status recovery in the sync engine for better error management.
This commit is contained in:
Anish Sarkar 2026-04-25 03:57:07 +05:30
parent 937965b335
commit 02795e08e3
6 changed files with 101 additions and 25 deletions

View file

@ -149,6 +149,7 @@ export default class SurfSensePlugin extends Plugin {
});
const onNetChange = () => {
void this.engine.recoverConnectivityStatus();
if (this.shouldAutoSync()) void this.engine.flushQueue();
};
this.registerDomEvent(window, "online", onNetChange);