Skip to main content
The Deno 2 Release Candidate is here
Learn more
class ProfileActivityService
import { ProfileActivityService } from "https://deno.land/x/sptaki@1.2.0/services/mod.ts";

Properties

protected
profileActivityTimestamps: Record<string, number>

Methods

activeWithinLastMinutes(sessionId: string, minutes: number): boolean

Was the requested profile active in the last requested minutes

getActiveProfileIdsWithinMinutes(minutes: number): string[]

Get an array of profile ids that were active in the last x minutes

setActivityTimestamp(sessionId: string): void

Update the timestamp a profile was last observed active