aboutsummaryrefslogtreecommitdiff
path: root/src/client/documents
diff options
context:
space:
mode:
authorNathan-SR <144961007+Nathan-SR@users.noreply.github.com>2024-10-10 19:30:06 -0400
committerNathan-SR <144961007+Nathan-SR@users.noreply.github.com>2024-10-10 19:30:06 -0400
commit373340938a4bc48edb4b9345f28e562de41153d6 (patch)
treed6604992d93a12920e1b62a1f906735d59434765 /src/client/documents
parent772c7a4c4d8867cbc33a673c3e3c6f3e330d395d (diff)
parent5752dff8ff7b1b2858542feec0b1bb037461bf1a (diff)
Merge branch 'nathan-starter' of https://github.com/brown-dash/Dash-Web into nathan-starter
Diffstat (limited to 'src/client/documents')
-rw-r--r--src/client/documents/DocumentTypes.ts1
-rw-r--r--src/client/documents/Documents.ts5
2 files changed, 6 insertions, 0 deletions
diff --git a/src/client/documents/DocumentTypes.ts b/src/client/documents/DocumentTypes.ts
index 59a121de7..e79207b04 100644
--- a/src/client/documents/DocumentTypes.ts
+++ b/src/client/documents/DocumentTypes.ts
@@ -32,6 +32,7 @@ export enum DocumentType {
ANNOPALETTE = 'annopalette',
LOADING = 'loading',
SIMULATION = 'simulation', // physics simulation
+ MESSAGE = 'message', // chat message
// special purpose wrappers that either take no data or are compositions of lower level types
LINK = 'link',
diff --git a/src/client/documents/Documents.ts b/src/client/documents/Documents.ts
index 0a7047128..951632d71 100644
--- a/src/client/documents/Documents.ts
+++ b/src/client/documents/Documents.ts
@@ -817,6 +817,11 @@ export namespace Docs {
export function RTFDocument(field: RichTextField, options: DocumentOptions = {}, fieldKey: string = 'text') {
return InstanceFromProto(Prototypes.get(DocumentType.RTF), field, options, undefined, fieldKey);
}
+
+ export function MessageDocument(field: string, options: DocumentOptions = {}, fieldKey: string = 'data') {
+ return InstanceFromProto(Prototypes.get(DocumentType.MESSAGE), field, options, undefined, fieldKey);
+ }
+
export function TextDocument(text: string, options: DocumentOptions = {}, fieldKey: string = 'text') {
const rtf = {
doc: {