sync device time on connect

This commit is contained in:
liamcottle
2025-02-13 01:06:01 +13:00
parent 6d4e7e4431
commit 0cb6398160

View File

@@ -43,6 +43,7 @@ class Connection {
});
await this.loadSelfInfo();
await this.syncDeviceTime();
await this.loadContacts();
}
@@ -59,6 +60,11 @@ class Connection {
GlobalState.contacts = await GlobalState.connection.getContacts();
}
static async syncDeviceTime() {
const timestamp = Math.floor(Date.now() / 1000);
await GlobalState.connection.sendCommandSetDeviceTime(timestamp);
}
}
export default Connection;