Add increment options and slight cleanup

This commit is contained in:
Owen
2026-01-12 20:48:18 -08:00
parent 0ccd5714f9
commit eba25fcc4d
14 changed files with 92 additions and 53 deletions

View File

@@ -170,18 +170,18 @@ export const handleOlmPingMessage: MessageHandler = async (context) => {
lastPing: Math.floor(Date.now() / 1000),
online: true
})
.where(eq(clients.clientId, olm.clientId)).returning();
.where(eq(clients.clientId, olm.clientId))
.returning();
// get the version
const configVersion = await getClientConfigVersion(olm.olmId);
if (message.configVersion && configVersion != message.configVersion) {
logger.warn(`Olm ping with outdated config version: ${message.configVersion} (current: ${configVersion})`);
logger.warn(
`Olm ping with outdated config version: ${message.configVersion} (current: ${configVersion})`
);
await sendOlmSyncMessage(olm, client);
}
} catch (error) {
logger.error("Error handling ping message", { error });
}