add reference objects for chatModel
This commit is contained in:
+31
-2
@@ -1,6 +1,10 @@
|
|||||||
// this file is responsible for managing chats.
|
// this file is responsible for managing chats.
|
||||||
|
|
||||||
import { DATA_VERSION, ValidObject, checkIsValidObject } from "./Utility/typeSafety";
|
import {
|
||||||
|
DATA_VERSION,
|
||||||
|
ValidObject,
|
||||||
|
checkIsValidObject,
|
||||||
|
} from "./Utility/typeSafety";
|
||||||
import FileModel, { File } from "./fileModel";
|
import FileModel, { File } from "./fileModel";
|
||||||
import StorageModel, { storageKeys } from "./storageModel";
|
import StorageModel, { storageKeys } from "./storageModel";
|
||||||
import {
|
import {
|
||||||
@@ -291,6 +295,16 @@ export interface ChatInfo extends ValidObject {
|
|||||||
hasUnreadMessages: boolean;
|
hasUnreadMessages: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export const ChatInfoReference: ChatInfo = {
|
||||||
|
dataVersion: DATA_VERSION,
|
||||||
|
|
||||||
|
primaryChannel: "",
|
||||||
|
secondaryChannels: [""],
|
||||||
|
encryptionKey: "",
|
||||||
|
|
||||||
|
hasUnreadMessages: true,
|
||||||
|
};
|
||||||
|
|
||||||
export enum ChatMessageStatus {
|
export enum ChatMessageStatus {
|
||||||
Outbox = "outbox",
|
Outbox = "outbox",
|
||||||
Sent = "sent",
|
Sent = "sent",
|
||||||
@@ -305,7 +319,22 @@ export interface ChatMessage extends ValidObject {
|
|||||||
body: string;
|
body: string;
|
||||||
dateSent: string;
|
dateSent: string;
|
||||||
|
|
||||||
status?: ChatMessageStatus;
|
status: ChatMessageStatus;
|
||||||
|
|
||||||
stringifiedFile: string;
|
stringifiedFile: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export const ChatMessageReference: ChatMessage = {
|
||||||
|
dataVersion: DATA_VERSION,
|
||||||
|
|
||||||
|
id: "",
|
||||||
|
|
||||||
|
channel: "",
|
||||||
|
sender: "",
|
||||||
|
body: "",
|
||||||
|
dateSent: "",
|
||||||
|
|
||||||
|
status: "" as ChatMessageStatus,
|
||||||
|
|
||||||
|
stringifiedFile: "",
|
||||||
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user