import type { FlowInfo } from "./data";

export function isSessionActive(session: FlowInfo): boolean {
	try {
		const lastPingDate = new Date(session.lastSyncedAt);
		const now = new Date();
		return now.getTime() - lastPingDate.getTime() < 60000;
	} catch (e) {
		return false;
	}
}
