UNPKG

raiden-ts

Version:

Raiden Light Client Typescript/Javascript SDK

22 lines (21 loc) 757 B
import type { MatrixClient } from 'matrix-js-sdk'; /** * Return server name without schema or path * * @param server - any URL * @returns server URL with domain and port (if present), without schema, paths or query params */ export declare function getServerName(server: string): string | null; /** * MatrixClient doesn't expose this API, but it does exist, so we create it here * * @param matrix - an already setup and started MatrixClient * @param userId - to fetch status/presence from * @returns Promise to object containing status data */ export declare function getUserPresence(matrix: MatrixClient, userId: string): Promise<{ presence: string; last_active_ago?: number; status_msg?: string; currently_active?: boolean; }>;