Defined in src/components/activity-tracker.ts:29 Constructors constructor new Activity Tracker ( client , opts ) : ActivityTracker Defined in src/components/activity-tracker.ts:32 Accessors using Whois get usingWhois( ) : null | boolean Returns null | boolean Defined in src/components/activity-tracker.ts:38 Methods is User Online is User Online ( userId , maxTimeMs , defaultOnline ? ) : Promise < { inactiveMs : number ; online : boolean ; } > Parameters userId : string maxTimeMs : number Optional
defaultOnline : boolean Returns Promise < { inactiveMs : number ; online : boolean ; } > Defined in src/components/activity-tracker.ts:69 set Last Active Time set Last Active Time ( userId , ts ? ) : void Parameters userId : string ts : number = ... Returns void Defined in src/components/activity-tracker.ts:47
This class provides a "one stop shop" to determine if a user is online. It uses a combination of a local cache, presence endpoints and admin APIs in that order.