Rename olm offline

This commit is contained in:
Owen
2025-08-13 20:31:48 -07:00
parent b638adedff
commit 34d705a54e
2 changed files with 4 additions and 4 deletions

View File

@@ -13,7 +13,7 @@ const OFFLINE_THRESHOLD_MS = 2 * 60 * 1000; // 2 minutes
* Starts the background interval that checks for clients that haven't pinged recently * Starts the background interval that checks for clients that haven't pinged recently
* and marks them as offline * and marks them as offline
*/ */
export const startOfflineChecker = (): void => { export const startOlmOfflineChecker = (): void => {
if (offlineCheckerInterval) { if (offlineCheckerInterval) {
return; // Already running return; // Already running
} }
@@ -42,7 +42,7 @@ export const startOfflineChecker = (): void => {
/** /**
* Stops the background interval that checks for offline clients * Stops the background interval that checks for offline clients
*/ */
export const stopOfflineChecker = (): void => { export const stopOlmOfflineChecker = (): void => {
if (offlineCheckerInterval) { if (offlineCheckerInterval) {
clearInterval(offlineCheckerInterval); clearInterval(offlineCheckerInterval);
offlineCheckerInterval = null; offlineCheckerInterval = null;

View File

@@ -10,7 +10,7 @@ import {
handleOlmRegisterMessage, handleOlmRegisterMessage,
handleOlmRelayMessage, handleOlmRelayMessage,
handleOlmPingMessage, handleOlmPingMessage,
startOfflineChecker startOlmOfflineChecker
} from "../olm"; } from "../olm";
import { MessageHandler } from "./ws"; import { MessageHandler } from "./ws";
@@ -26,4 +26,4 @@ export const messageHandlers: Record<string, MessageHandler> = {
"newt/ping/request": handleNewtPingRequestMessage, "newt/ping/request": handleNewtPingRequestMessage,
}; };
startOfflineChecker(); // this is to handle the offline check for olms startOlmOfflineChecker(); // this is to handle the offline check for olms