Closed nesium closed 4 months ago
New/updated JS API:
export interface RoomBase { // … loadComposingUsers(): Promise<ParticipantBasicInfo[]>; // … } export class Avatar { /** * An opaque identifier to check if the contents of the `Avatar` have changed. * While `ProseClient` caches loaded avatars, checking for a change in the `Avatar` might * still make sense, since `Client::loadAvatarDataURL` is asynchronous. */ readonly id: string; } export class JabberClient { toString(): string; isProse(): boolean; } export class UserBasicInfo { // … readonly avatar: Avatar | undefined; // … } export class UserPresenceInfo { // … readonly avatar: Avatar | undefined; /** * XEP-0108: User Activity */ readonly status: UserStatus | undefined; /** * Contains the full name only if first and last name are set. */ readonly fullName: string | undefined; // … } export class ParticipantId { toString(): string; } export class ParticipantBasicInfo { readonly avatar: Avatar | undefined; readonly id: ParticipantId; readonly name: string; } export class ParticipantInfo { // … readonly avatar: Avatar | undefined; readonly client: JabberClient | undefined; readonly id: ParticipantId; /** * XEP-0310: Presence State Annotations */ readonly status: string | undefined; // … } export class Contact { // … /** * Contains the full name only if first and last name are set. */ readonly fullName: string | undefined; // … } export class ProseClient { // … /** * XEP-0084: User Avatar * https://xmpp.org/extensions/xep-0084.html * @param {Avatar} avatar * @returns {Promise<string | undefined>} */ loadAvatarDataURL(avatar: Avatar): Promise<string | undefined>; // … }
New/updated JS API: