mirror of
https://github.com/block/buzz.git
synced 2026-10-29 05:21:31 +00:00
10 lines
291 B
TypeScript
10 lines
291 B
TypeScript
// Matches the ephemeral channel TTL used when a huddle is created.
|
|
export const HUDDLE_JOINABLE_WINDOW_SECONDS = 60 * 60;
|
|
|
|
export function isHuddleStartStale(
|
|
createdAtSeconds: number,
|
|
nowMs = Date.now(),
|
|
) {
|
|
return nowMs / 1000 - createdAtSeconds > HUDDLE_JOINABLE_WINDOW_SECONDS;
|
|
}
|