started work on frontend message handlers
added type annots to reinforce data structure robustness started creating Chat.tsx event handlers
This commit is contained in:
parent
884c5dce98
commit
486751022c
2 changed files with 69 additions and 1 deletions
23
src/Chat/ChatMessage.tsx
Normal file
23
src/Chat/ChatMessage.tsx
Normal file
|
@ -0,0 +1,23 @@
|
|||
enum FileType {
|
||||
FILE_TXT,
|
||||
DOCUMENT_WORD,
|
||||
DOCUMENT_PDF,
|
||||
IMAGE,
|
||||
EXEC_BINARY,
|
||||
UNKNOWN,
|
||||
}
|
||||
export type Attachment = {
|
||||
name: string,
|
||||
uri: string,
|
||||
sizeBytes: number,
|
||||
filetype: FileType
|
||||
}
|
||||
export type ChatMessage = {
|
||||
from: string,
|
||||
fromIP: string,
|
||||
to: Array<string>,
|
||||
toIPs: Array<string>,
|
||||
timestampPosted: number,
|
||||
message: string,
|
||||
attachments: Attachment
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue