2022-01-11 13:51:48 +00:00
|
|
|
import Model from '@nozbe/watermelondb/Model';
|
|
|
|
|
|
|
|
import { IAttachment } from './IAttachment';
|
2022-02-16 21:14:28 +00:00
|
|
|
import { IEditedBy, ITranslations, IUserChannel, IUserMention, IUserMessage, MessageType } from './IMessage';
|
2022-01-11 13:51:48 +00:00
|
|
|
import { IReaction } from './IReaction';
|
2022-02-17 00:07:24 +00:00
|
|
|
import { IUrl } from './IUrl';
|
2022-01-11 13:51:48 +00:00
|
|
|
|
|
|
|
export interface IThreadMessage {
|
2022-02-22 16:01:35 +00:00
|
|
|
id: string;
|
2022-02-17 00:07:24 +00:00
|
|
|
_id: string;
|
2022-02-16 21:14:28 +00:00
|
|
|
tmsg?: string;
|
2022-01-11 13:51:48 +00:00
|
|
|
msg?: string;
|
2022-02-16 21:14:28 +00:00
|
|
|
t?: MessageType;
|
2022-01-11 13:51:48 +00:00
|
|
|
rid: string;
|
2022-02-17 00:07:24 +00:00
|
|
|
ts: string | Date;
|
2022-01-11 13:51:48 +00:00
|
|
|
u: IUserMessage;
|
|
|
|
alias?: string;
|
|
|
|
parseUrls?: boolean;
|
|
|
|
groupable?: boolean;
|
|
|
|
avatar?: string;
|
|
|
|
emoji?: string;
|
|
|
|
attachments?: IAttachment[];
|
2022-02-17 00:07:24 +00:00
|
|
|
urls?: IUrl[];
|
2022-02-22 16:01:35 +00:00
|
|
|
_updatedAt?: string | Date;
|
2022-01-11 13:51:48 +00:00
|
|
|
status?: number;
|
|
|
|
pinned?: boolean;
|
|
|
|
starred?: boolean;
|
|
|
|
editedBy?: IEditedBy;
|
|
|
|
reactions?: IReaction[];
|
|
|
|
role?: string;
|
|
|
|
drid?: string;
|
|
|
|
dcount?: number;
|
2022-02-22 16:01:35 +00:00
|
|
|
dlm?: string | Date;
|
2022-01-11 13:51:48 +00:00
|
|
|
tmid?: string;
|
|
|
|
tcount?: number;
|
2022-02-22 16:01:35 +00:00
|
|
|
tlm?: string | Date;
|
2022-01-11 13:51:48 +00:00
|
|
|
replies?: string[];
|
|
|
|
mentions?: IUserMention[];
|
|
|
|
channels?: IUserChannel[];
|
|
|
|
unread?: boolean;
|
|
|
|
autoTranslate?: boolean;
|
|
|
|
translations?: ITranslations[];
|
|
|
|
e2e?: string;
|
2022-02-17 00:07:24 +00:00
|
|
|
subscription?: { id: string };
|
2022-01-11 13:51:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
export type TThreadMessageModel = IThreadMessage & Model;
|