|
@@ -1,211 +1,4 @@
|
|
|
export default Message;
|
|
|
-declare const Message_base: {
|
|
|
- new (...args: any[]): {
|
|
|
- _vcard: import("../vcard/vcard.js").default;
|
|
|
- lazy_load_vcard: boolean;
|
|
|
- initialize(): void;
|
|
|
- readonly vcard: import("../vcard/vcard.js").default;
|
|
|
- getVCard(create?: boolean): Promise<import("../vcard/vcard.js").default | null>;
|
|
|
- cid: any;
|
|
|
- attributes: {};
|
|
|
- validationError: string;
|
|
|
- collection: any;
|
|
|
- changed: {};
|
|
|
- browserStorage: Storage;
|
|
|
- _browserStorage: Storage;
|
|
|
- readonly idAttribute: string;
|
|
|
- readonly cidPrefix: string;
|
|
|
- preinitialize(): void;
|
|
|
- validate(attrs: object, options?: object): string;
|
|
|
- toJSON(): any;
|
|
|
- sync(method: "create" | "update" | "patch" | "delete" | "read", model: Model, options: import("@converse/skeletor/src/types/model.js").Options): any;
|
|
|
- get(attr: string): any;
|
|
|
- keys(): string[];
|
|
|
- values(): any[];
|
|
|
- pairs(): [string, any][];
|
|
|
- entries(): [string, any][];
|
|
|
- invert(): any;
|
|
|
- pick(...args: any[]): any;
|
|
|
- omit(...args: any[]): any;
|
|
|
- isEmpty(): any;
|
|
|
- has(attr: string): boolean;
|
|
|
- matches(attrs: import("@converse/skeletor/src/types/model.js").Attributes): boolean;
|
|
|
- set(key: string | any, val?: string | any, options?: import("@converse/skeletor/src/types/model.js").Options): false | any;
|
|
|
- _changing: boolean;
|
|
|
- _previousAttributes: any;
|
|
|
- id: any;
|
|
|
- _pending: boolean | import("@converse/skeletor/src/types/model.js").Options;
|
|
|
- unset(attr: string, options?: import("@converse/skeletor/src/types/model.js").Options): false | any;
|
|
|
- clear(options: import("@converse/skeletor/src/types/model.js").Options): false | any;
|
|
|
- hasChanged(attr?: string): any;
|
|
|
- changedAttributes(diff: any): any;
|
|
|
- previous(attr?: string): any;
|
|
|
- previousAttributes(): any;
|
|
|
- fetch(options?: import("@converse/skeletor/src/types/model.js").Options): any;
|
|
|
- save(key?: string | import("@converse/skeletor/src/types/model.js").Attributes, val?: boolean | number | string | import("@converse/skeletor/src/types/model.js").Options, options?: import("@converse/skeletor/src/types/model.js").Options): any;
|
|
|
- destroy(options?: import("@converse/skeletor/src/types/model.js").Options): boolean;
|
|
|
- url(): any;
|
|
|
- parse(resp: import("@converse/skeletor/src/types/model.js").Options, options?: import("@converse/skeletor/src/types/model.js").Options): import("@converse/skeletor/src/types/model.js").Options;
|
|
|
- isNew(): boolean;
|
|
|
- isValid(options?: import("@converse/skeletor/src/types/model.js").Options): boolean;
|
|
|
- _validate(attrs: import("@converse/skeletor/src/types/model.js").Attributes, options?: import("@converse/skeletor/src/types/model.js").Options): boolean;
|
|
|
- on(name: string, callback: (event: any, model: Model, collection: import("@converse/skeletor").Collection, options: Record<string, any>) => any, context: any): any;
|
|
|
- _events: any;
|
|
|
- _listeners: {};
|
|
|
- listenTo(obj: any, name: string, callback?: (event: any, model: Model, collection: import("@converse/skeletor").Collection, options: Record<string, any>) => any): any;
|
|
|
- _listeningTo: {};
|
|
|
- _listenId: any;
|
|
|
- off(name: string, callback: (event: any, model: Model, collection: import("@converse/skeletor").Collection, options: Record<string, any>) => any, context?: any): any;
|
|
|
- stopListening(obj?: any, name?: string, callback?: (event: any, model: Model, collection: import("@converse/skeletor").Collection, options: Record<string, any>) => any): any;
|
|
|
- once(name: string, callback: (event: any, model: Model, collection: import("@converse/skeletor").Collection, options: Record<string, any>) => any, context: any): any;
|
|
|
- listenToOnce(obj: any, name: string, callback?: (event: any, model: Model, collection: import("@converse/skeletor").Collection, options: Record<string, any>) => any): any;
|
|
|
- trigger(name: string, ...args: any[]): any;
|
|
|
- constructor: Function;
|
|
|
- toString(): string;
|
|
|
- toLocaleString(): string;
|
|
|
- valueOf(): Object;
|
|
|
- hasOwnProperty(v: PropertyKey): boolean;
|
|
|
- isPrototypeOf(v: Object): boolean;
|
|
|
- propertyIsEnumerable(v: PropertyKey): boolean;
|
|
|
- };
|
|
|
-} & {
|
|
|
- new (...args: any[]): {
|
|
|
- initialize(): void;
|
|
|
- rosterContactAdded: any;
|
|
|
- contact: import("../roster/contact.js").default | import("../status/status.js").default;
|
|
|
- setModelContact(jid: string): Promise<void>;
|
|
|
- cid: any;
|
|
|
- attributes: {};
|
|
|
- validationError: string;
|
|
|
- collection: any;
|
|
|
- changed: {};
|
|
|
- browserStorage: Storage;
|
|
|
- _browserStorage: Storage;
|
|
|
- readonly idAttribute: string;
|
|
|
- readonly cidPrefix: string;
|
|
|
- preinitialize(): void;
|
|
|
- validate(attrs: object, options?: object): string;
|
|
|
- toJSON(): any;
|
|
|
- sync(method: "create" | "update" | "patch" | "delete" | "read", model: Model, options: import("@converse/skeletor/src/types/model.js").Options): any;
|
|
|
- get(attr: string): any;
|
|
|
- keys(): string[];
|
|
|
- values(): any[];
|
|
|
- pairs(): [string, any][];
|
|
|
- entries(): [string, any][];
|
|
|
- invert(): any;
|
|
|
- pick(...args: any[]): any;
|
|
|
- omit(...args: any[]): any;
|
|
|
- isEmpty(): any;
|
|
|
- has(attr: string): boolean;
|
|
|
- matches(attrs: import("@converse/skeletor/src/types/model.js").Attributes): boolean;
|
|
|
- set(key: string | any, val?: string | any, options?: import("@converse/skeletor/src/types/model.js").Options): false | any;
|
|
|
- _changing: boolean;
|
|
|
- _previousAttributes: any;
|
|
|
- id: any;
|
|
|
- _pending: boolean | import("@converse/skeletor/src/types/model.js").Options;
|
|
|
- unset(attr: string, options?: import("@converse/skeletor/src/types/model.js").Options): false | any;
|
|
|
- clear(options: import("@converse/skeletor/src/types/model.js").Options): false | any;
|
|
|
- hasChanged(attr?: string): any;
|
|
|
- changedAttributes(diff: any): any;
|
|
|
- previous(attr?: string): any;
|
|
|
- previousAttributes(): any;
|
|
|
- fetch(options?: import("@converse/skeletor/src/types/model.js").Options): any;
|
|
|
- save(key?: string | import("@converse/skeletor/src/types/model.js").Attributes, val?: boolean | number | string | import("@converse/skeletor/src/types/model.js").Options, options?: import("@converse/skeletor/src/types/model.js").Options): any;
|
|
|
- destroy(options?: import("@converse/skeletor/src/types/model.js").Options): boolean;
|
|
|
- url(): any;
|
|
|
- parse(resp: import("@converse/skeletor/src/types/model.js").Options, options?: import("@converse/skeletor/src/types/model.js").Options): import("@converse/skeletor/src/types/model.js").Options;
|
|
|
- isNew(): boolean;
|
|
|
- isValid(options?: import("@converse/skeletor/src/types/model.js").Options): boolean;
|
|
|
- _validate(attrs: import("@converse/skeletor/src/types/model.js").Attributes, options?: import("@converse/skeletor/src/types/model.js").Options): boolean;
|
|
|
- on(name: string, callback: (event: any, model: Model, collection: import("@converse/skeletor").Collection, options: Record<string, any>) => any, context: any): any;
|
|
|
- _events: any;
|
|
|
- _listeners: {};
|
|
|
- listenTo(obj: any, name: string, callback?: (event: any, model: Model, collection: import("@converse/skeletor").Collection, options: Record<string, any>) => any): any;
|
|
|
- _listeningTo: {};
|
|
|
- _listenId: any;
|
|
|
- off(name: string, callback: (event: any, model: Model, collection: import("@converse/skeletor").Collection, options: Record<string, any>) => any, context?: any): any;
|
|
|
- stopListening(obj?: any, name?: string, callback?: (event: any, model: Model, collection: import("@converse/skeletor").Collection, options: Record<string, any>) => any): any;
|
|
|
- once(name: string, callback: (event: any, model: Model, collection: import("@converse/skeletor").Collection, options: Record<string, any>) => any, context: any): any;
|
|
|
- listenToOnce(obj: any, name: string, callback?: (event: any, model: Model, collection: import("@converse/skeletor").Collection, options: Record<string, any>) => any): any;
|
|
|
- trigger(name: string, ...args: any[]): any;
|
|
|
- constructor: Function;
|
|
|
- toString(): string;
|
|
|
- toLocaleString(): string;
|
|
|
- valueOf(): Object;
|
|
|
- hasOwnProperty(v: PropertyKey): boolean;
|
|
|
- isPrototypeOf(v: Object): boolean;
|
|
|
- propertyIsEnumerable(v: PropertyKey): boolean;
|
|
|
- };
|
|
|
-} & {
|
|
|
- new (...args: any[]): {
|
|
|
- setColor(): Promise<void>;
|
|
|
- getIdentifier(): any;
|
|
|
- getColor(): Promise<string>;
|
|
|
- getAvatarStyle(append_style?: string): Promise<string>;
|
|
|
- cid: any;
|
|
|
- attributes: {};
|
|
|
- validationError: string;
|
|
|
- collection: any;
|
|
|
- changed: {};
|
|
|
- browserStorage: Storage;
|
|
|
- _browserStorage: Storage;
|
|
|
- readonly idAttribute: string;
|
|
|
- readonly cidPrefix: string;
|
|
|
- preinitialize(): void;
|
|
|
- initialize(): void;
|
|
|
- validate(attrs: object, options?: object): string;
|
|
|
- toJSON(): any;
|
|
|
- sync(method: "create" | "update" | "patch" | "delete" | "read", model: Model, options: import("@converse/skeletor/src/types/model.js").Options): any;
|
|
|
- get(attr: string): any;
|
|
|
- keys(): string[];
|
|
|
- values(): any[];
|
|
|
- pairs(): [string, any][];
|
|
|
- entries(): [string, any][];
|
|
|
- invert(): any;
|
|
|
- pick(...args: any[]): any;
|
|
|
- omit(...args: any[]): any;
|
|
|
- isEmpty(): any;
|
|
|
- has(attr: string): boolean;
|
|
|
- matches(attrs: import("@converse/skeletor/src/types/model.js").Attributes): boolean;
|
|
|
- set(key: string | any, val?: string | any, options?: import("@converse/skeletor/src/types/model.js").Options): false | any;
|
|
|
- _changing: boolean;
|
|
|
- _previousAttributes: any;
|
|
|
- id: any;
|
|
|
- _pending: boolean | import("@converse/skeletor/src/types/model.js").Options;
|
|
|
- unset(attr: string, options?: import("@converse/skeletor/src/types/model.js").Options): false | any;
|
|
|
- clear(options: import("@converse/skeletor/src/types/model.js").Options): false | any;
|
|
|
- hasChanged(attr?: string): any;
|
|
|
- changedAttributes(diff: any): any;
|
|
|
- previous(attr?: string): any;
|
|
|
- previousAttributes(): any;
|
|
|
- fetch(options?: import("@converse/skeletor/src/types/model.js").Options): any;
|
|
|
- save(key?: string | import("@converse/skeletor/src/types/model.js").Attributes, val?: boolean | number | string | import("@converse/skeletor/src/types/model.js").Options, options?: import("@converse/skeletor/src/types/model.js").Options): any;
|
|
|
- destroy(options?: import("@converse/skeletor/src/types/model.js").Options): boolean;
|
|
|
- url(): any;
|
|
|
- parse(resp: import("@converse/skeletor/src/types/model.js").Options, options?: import("@converse/skeletor/src/types/model.js").Options): import("@converse/skeletor/src/types/model.js").Options;
|
|
|
- isNew(): boolean;
|
|
|
- isValid(options?: import("@converse/skeletor/src/types/model.js").Options): boolean;
|
|
|
- _validate(attrs: import("@converse/skeletor/src/types/model.js").Attributes, options?: import("@converse/skeletor/src/types/model.js").Options): boolean;
|
|
|
- on(name: string, callback: (event: any, model: Model, collection: import("@converse/skeletor").Collection, options: Record<string, any>) => any, context: any): any;
|
|
|
- _events: any;
|
|
|
- _listeners: {};
|
|
|
- listenTo(obj: any, name: string, callback?: (event: any, model: Model, collection: import("@converse/skeletor").Collection, options: Record<string, any>) => any): any;
|
|
|
- _listeningTo: {};
|
|
|
- _listenId: any;
|
|
|
- off(name: string, callback: (event: any, model: Model, collection: import("@converse/skeletor").Collection, options: Record<string, any>) => any, context?: any): any;
|
|
|
- stopListening(obj?: any, name?: string, callback?: (event: any, model: Model, collection: import("@converse/skeletor").Collection, options: Record<string, any>) => any): any;
|
|
|
- once(name: string, callback: (event: any, model: Model, collection: import("@converse/skeletor").Collection, options: Record<string, any>) => any, context: any): any;
|
|
|
- listenToOnce(obj: any, name: string, callback?: (event: any, model: Model, collection: import("@converse/skeletor").Collection, options: Record<string, any>) => any): any;
|
|
|
- trigger(name: string, ...args: any[]): any;
|
|
|
- constructor: Function;
|
|
|
- toString(): string;
|
|
|
- toLocaleString(): string;
|
|
|
- valueOf(): Object;
|
|
|
- hasOwnProperty(v: PropertyKey): boolean;
|
|
|
- isPrototypeOf(v: Object): boolean;
|
|
|
- propertyIsEnumerable(v: PropertyKey): boolean;
|
|
|
- };
|
|
|
-} & typeof Model;
|
|
|
/**
|
|
|
* Represents a (non-MUC) message.
|
|
|
* These can be either `chat`, `normal` or `headline` messages.
|
|
@@ -213,88 +6,12 @@ declare const Message_base: {
|
|
|
* @memberOf _converse
|
|
|
* @example const msg = new Message({'message': 'hello world!'});
|
|
|
*/
|
|
|
-declare class Message extends Message_base {
|
|
|
- /**
|
|
|
- * @param {Model[]} [models]
|
|
|
- * @param {object} [options]
|
|
|
- */
|
|
|
- constructor(models?: Model[], options?: object);
|
|
|
- defaults(): {
|
|
|
- msgid: string;
|
|
|
- time: string;
|
|
|
- is_ephemeral: boolean;
|
|
|
- };
|
|
|
- file: any;
|
|
|
- /** @type {import('./types').MessageAttributes} */
|
|
|
- attributes: import("./types").MessageAttributes;
|
|
|
+declare class Message extends BaseMessage<any> {
|
|
|
+ constructor(models?: import("@converse/skeletor").Model[], options?: object);
|
|
|
initialize(): Promise<void>;
|
|
|
- chatbox: any;
|
|
|
initialized: any;
|
|
|
setContact(): Promise<void>;
|
|
|
- /**
|
|
|
- * Sets an auto-destruct timer for this message, if it's is_ephemeral.
|
|
|
- * @method _converse.Message#setTimerForEphemeralMessage
|
|
|
- */
|
|
|
- setTimerForEphemeralMessage(): void;
|
|
|
- ephemeral_timer: NodeJS.Timeout;
|
|
|
- checkValidity(): boolean;
|
|
|
- /**
|
|
|
- * Determines whether this messsage may be retracted by the current user.
|
|
|
- * @method _converse.Messages#mayBeRetracted
|
|
|
- * @returns { Boolean }
|
|
|
- */
|
|
|
- mayBeRetracted(): boolean;
|
|
|
- safeDestroy(): void;
|
|
|
- /**
|
|
|
- * Returns a boolean indicating whether this message is ephemeral,
|
|
|
- * meaning it will get automatically removed after ten seconds.
|
|
|
- * @returns {boolean}
|
|
|
- */
|
|
|
- isEphemeral(): boolean;
|
|
|
- /**
|
|
|
- * Returns a boolean indicating whether this message is a XEP-0245 /me command.
|
|
|
- * @returns {boolean}
|
|
|
- */
|
|
|
- isMeCommand(): boolean;
|
|
|
- /**
|
|
|
- * @returns {boolean}
|
|
|
- */
|
|
|
- isRetracted(): boolean;
|
|
|
- /**
|
|
|
- * Returns a boolean indicating whether this message is considered a followup
|
|
|
- * message from the previous one. Followup messages are shown grouped together
|
|
|
- * under one author heading.
|
|
|
- * A message is considered a followup of it's predecessor when it's a chat
|
|
|
- * message from the same author, within 10 minutes.
|
|
|
- * @returns {boolean}
|
|
|
- */
|
|
|
- isFollowup(): boolean;
|
|
|
getDisplayName(): any;
|
|
|
- getMessageText(): any;
|
|
|
- /**
|
|
|
- * Send out an IQ stanza to request a file upload slot.
|
|
|
- * https://xmpp.org/extensions/xep-0363.html#request
|
|
|
- * @private
|
|
|
- * @method _converse.Message#sendSlotRequestStanza
|
|
|
- */
|
|
|
- private sendSlotRequestStanza;
|
|
|
- /**
|
|
|
- * @param {Element} stanza
|
|
|
- */
|
|
|
- getUploadRequestMetadata(stanza: Element): {
|
|
|
- headers: {
|
|
|
- name: string;
|
|
|
- value: string;
|
|
|
- }[];
|
|
|
- };
|
|
|
- getRequestSlotURL(): Promise<any>;
|
|
|
- upload_metadata: {
|
|
|
- headers: {
|
|
|
- name: string;
|
|
|
- value: string;
|
|
|
- }[];
|
|
|
- };
|
|
|
- uploadFile(): void;
|
|
|
}
|
|
|
-import { Model } from '@converse/skeletor';
|
|
|
+import BaseMessage from '../../shared/message.js';
|
|
|
//# sourceMappingURL=message.d.ts.map
|