You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
42 lines
955 B
TypeScript
42 lines
955 B
TypeScript
import { Message, MessageParams } from './Message';
|
|
import { AttachmentPointer, Preview, Quote } from './content';
|
|
|
|
interface OpenGroup {
|
|
server: string;
|
|
channel: number;
|
|
conversationId: string;
|
|
}
|
|
|
|
interface OpenGroupMessageParams extends MessageParams {
|
|
group: OpenGroup;
|
|
attachments: Array<AttachmentPointer>;
|
|
preview: Array<Preview>;
|
|
body?: string;
|
|
quote?: Quote;
|
|
}
|
|
|
|
export class OpenGroupMessage extends Message {
|
|
public readonly group: OpenGroup;
|
|
public readonly body?: string;
|
|
public readonly attachments: Array<AttachmentPointer>;
|
|
public readonly quote?: Quote;
|
|
public readonly preview: Array<Preview>;
|
|
|
|
constructor({
|
|
timestamp,
|
|
group,
|
|
attachments,
|
|
body,
|
|
quote,
|
|
identifier,
|
|
preview,
|
|
}: OpenGroupMessageParams) {
|
|
super({ timestamp, identifier });
|
|
this.group = group;
|
|
this.body = body;
|
|
this.attachments = attachments;
|
|
this.quote = quote;
|
|
this.preview = preview;
|
|
}
|
|
}
|