Interface ActivityTrackerOpts

interface ActivityTrackerOpts {
    defaultOnline: boolean;
    onLastActiveTimeUpdated?: ((userId, ts) => void | Promise<void>);
    serverName: string;
    usePresence?: boolean;
}

Properties

defaultOnline: boolean

Should the tracker assume offline or online if it doesn't have enough information.

onLastActiveTimeUpdated?: ((userId, ts) => void | Promise<void>)

Run a function when the last active time for a user gets updated

Type declaration

    • (userId, ts): void | Promise<void>
    • Run a function when the last active time for a user gets updated

      Parameters

      • userId: string
      • ts: number

      Returns void | Promise<void>

serverName: string

Matrix server name. Used for determining local and remote users.

Example

matrix.org
usePresence?: boolean

Should presence be used. Set to false if the homeserver has presence disabled.

Generated using TypeDoc