From 73e927876c03ed041c1439a310540c01656f457d Mon Sep 17 00:00:00 2001 From: Anna No Date: Thu, 26 Oct 2023 00:00:08 +0700 Subject: [PATCH] EZQMS-306: add extensions for chunter message version (#3882) * EZQMS-306: add extensions for chunter message version Signed-off-by: Anna No * EZQMS-306: add extensions for chunter message version Signed-off-by: Anna No * EZQMS-306: add extensions for chunter message version Signed-off-by: Anna No * EZQMS-306: add extensions for chunter message version Signed-off-by: Anna No --------- Signed-off-by: Anna No --- models/chunter/src/index.ts | 5 ++ .../src/components/Message.svelte | 70 ++++++++++--------- .../src/components/Thread.svelte | 3 + plugins/chunter-resources/src/index.ts | 2 +- plugins/chunter/src/index.ts | 8 ++- .../src/components/ObjectPresenter.svelte | 3 +- 6 files changed, 56 insertions(+), 35 deletions(-) diff --git a/models/chunter/src/index.ts b/models/chunter/src/index.ts index 0e41600572..dbd18990e4 100644 --- a/models/chunter/src/index.ts +++ b/models/chunter/src/index.ts @@ -19,6 +19,7 @@ import { Channel, chunterId, ChunterMessage, + ChunterMessageExtension, ChunterSpace, Comment, DirectMessage, @@ -101,6 +102,9 @@ export class TChunterMessage extends TAttachedDoc implements ChunterMessage { reactions?: number } +@Mixin(chunter.mixin.ChunterMessageExtension, chunter.class.ChunterMessage) +export class TChunterMessageExtension extends TChunterMessage implements ChunterMessageExtension {} + @Model(chunter.class.ThreadMessage, chunter.class.ChunterMessage) @UX(chunter.string.ThreadMessage, undefined, 'TMSG') export class TThreadMessage extends TChunterMessage implements ThreadMessage { @@ -173,6 +177,7 @@ export function createModel (builder: Builder, options = { addApplication: true TMessage, TThreadMessage, TChunterMessage, + TChunterMessageExtension, TComment, TBacklink, TDirectMessage, diff --git a/plugins/chunter-resources/src/components/Message.svelte b/plugins/chunter-resources/src/components/Message.svelte index d8404cec75..9835d5b5b8 100644 --- a/plugins/chunter-resources/src/components/Message.svelte +++ b/plugins/chunter-resources/src/components/Message.svelte @@ -15,16 +15,15 @@