2021-10-20 16:32:58 +00:00
|
|
|
import { MarkdownAST } from '@rocket.chat/message-parser';
|
|
|
|
|
2021-09-13 20:41:05 +00:00
|
|
|
export interface IMessageAttachments {
|
|
|
|
attachments: any;
|
|
|
|
timeFormat: string;
|
|
|
|
showAttachment: Function;
|
|
|
|
getCustomEmoji: Function;
|
|
|
|
theme: string;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface IMessageAttachedActions {
|
|
|
|
attachment: {
|
|
|
|
actions: [];
|
|
|
|
text: string;
|
|
|
|
};
|
|
|
|
theme: string;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface IMessageAvatar {
|
|
|
|
isHeader: boolean;
|
|
|
|
avatar: string;
|
|
|
|
emoji: string;
|
|
|
|
author: {
|
|
|
|
username: string;
|
|
|
|
_id: string;
|
|
|
|
};
|
|
|
|
small?: boolean;
|
|
|
|
navToRoomInfo: Function;
|
|
|
|
getCustomEmoji(): void;
|
|
|
|
theme: string;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface IMessageBlocks {
|
|
|
|
blocks: any;
|
|
|
|
id: string;
|
|
|
|
rid: string;
|
|
|
|
blockAction: Function;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface IMessageBroadcast {
|
|
|
|
author: {
|
|
|
|
_id: string;
|
|
|
|
};
|
|
|
|
broadcast: boolean;
|
|
|
|
theme: string;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface IMessageCallButton {
|
|
|
|
theme: string;
|
|
|
|
callJitsi: Function;
|
|
|
|
}
|
|
|
|
|
2021-10-20 16:32:58 +00:00
|
|
|
export interface IUser {
|
2022-01-17 16:10:39 +00:00
|
|
|
id: string;
|
2021-10-20 16:32:58 +00:00
|
|
|
username: string;
|
2022-01-17 16:10:39 +00:00
|
|
|
token: string;
|
2021-10-20 16:32:58 +00:00
|
|
|
name: string;
|
|
|
|
}
|
|
|
|
|
2022-01-17 16:10:39 +00:00
|
|
|
export type UserMention = Pick<IUser, 'id' | 'username' | 'name'>;
|
2021-10-20 16:32:58 +00:00
|
|
|
|
2021-09-13 20:41:05 +00:00
|
|
|
export interface IMessageContent {
|
2021-11-10 17:56:19 +00:00
|
|
|
_id: string;
|
2021-09-13 20:41:05 +00:00
|
|
|
isTemp: boolean;
|
|
|
|
isInfo: boolean;
|
|
|
|
tmid: string;
|
|
|
|
isThreadRoom: boolean;
|
|
|
|
msg: string;
|
2021-10-20 16:32:58 +00:00
|
|
|
md: MarkdownAST;
|
2021-09-13 20:41:05 +00:00
|
|
|
theme: string;
|
|
|
|
isEdited: boolean;
|
|
|
|
isEncrypted: boolean;
|
|
|
|
getCustomEmoji: Function;
|
|
|
|
channels: {
|
|
|
|
name: string;
|
|
|
|
_id: number;
|
|
|
|
}[];
|
2021-10-20 16:32:58 +00:00
|
|
|
mentions: UserMention[];
|
2021-09-13 20:41:05 +00:00
|
|
|
navToRoomInfo: Function;
|
|
|
|
useRealName: boolean;
|
|
|
|
isIgnored: boolean;
|
|
|
|
type: string;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface IMessageDiscussion {
|
|
|
|
msg: string;
|
|
|
|
dcount: number;
|
2022-01-12 12:54:04 +00:00
|
|
|
dlm: Date;
|
2021-09-13 20:41:05 +00:00
|
|
|
theme: string;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface IMessageEmoji {
|
|
|
|
content: any;
|
|
|
|
baseUrl: string;
|
|
|
|
standardEmojiStyle: object;
|
|
|
|
customEmojiStyle: object;
|
|
|
|
getCustomEmoji: Function;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface IMessageThread {
|
|
|
|
msg: string;
|
|
|
|
tcount: number;
|
|
|
|
theme: string;
|
|
|
|
tlm: string;
|
|
|
|
isThreadRoom: boolean;
|
|
|
|
id: string;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface IMessageTouchable {
|
|
|
|
hasError: boolean;
|
|
|
|
isInfo: boolean;
|
|
|
|
isThreadReply: boolean;
|
|
|
|
isTemp: boolean;
|
|
|
|
archived: boolean;
|
|
|
|
highlighted: boolean;
|
|
|
|
theme: string;
|
|
|
|
ts?: any;
|
|
|
|
urls?: any;
|
|
|
|
reactions?: any;
|
|
|
|
alias?: any;
|
|
|
|
role?: any;
|
|
|
|
drid?: any;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface IMessageRepliedThread {
|
|
|
|
tmid: string;
|
|
|
|
tmsg: string;
|
|
|
|
id: string;
|
|
|
|
isHeader: boolean;
|
|
|
|
theme: string;
|
|
|
|
fetchThreadName: Function;
|
|
|
|
isEncrypted: boolean;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface IMessageInner
|
|
|
|
extends IMessageDiscussion,
|
|
|
|
IMessageContent,
|
|
|
|
IMessageCallButton,
|
|
|
|
IMessageBlocks,
|
|
|
|
IMessageThread,
|
|
|
|
IMessageAttachments,
|
|
|
|
IMessageBroadcast {
|
2021-10-29 15:56:57 +00:00
|
|
|
type: 'discussion-created' | 'jitsi_call_started' | 'c' | 'd' | 'p' | 'l';
|
2021-09-13 20:41:05 +00:00
|
|
|
blocks: [];
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface IMessage extends IMessageRepliedThread, IMessageInner {
|
|
|
|
isThreadReply: boolean;
|
|
|
|
isThreadSequential: boolean;
|
|
|
|
isInfo: boolean;
|
|
|
|
isTemp: boolean;
|
|
|
|
isHeader: boolean;
|
|
|
|
hasError: boolean;
|
|
|
|
style: any;
|
|
|
|
onLongPress: Function;
|
|
|
|
isReadReceiptEnabled: boolean;
|
|
|
|
unread: boolean;
|
|
|
|
theme: string;
|
|
|
|
isIgnored: boolean;
|
|
|
|
}
|