mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
add atribute to message
This commit is contained in:
@@ -18,12 +18,14 @@ export const MessageTable = z.object({
|
||||
userPhoto: z.string(),
|
||||
}),
|
||||
sending: z.boolean().optional(),
|
||||
reaction: z.object({
|
||||
reactions: z.object({
|
||||
id: z.string(),
|
||||
reactedAt: z.string(),
|
||||
reaction: z.string(),
|
||||
sender: z.object({}),
|
||||
}).array()
|
||||
}).array().optional(),
|
||||
info: z.array(z.object({})).optional(),
|
||||
attachments: z.array(z.object({})).optional()
|
||||
})
|
||||
|
||||
export type MessageTable = z.infer<typeof MessageTable>
|
||||
|
||||
@@ -5,6 +5,7 @@ import { DexieMembersTableSchema, MemberTableColumn } from './schema/members';
|
||||
import { DexieRoomsTableSchema, RoomTableColumn } from './schema/room';
|
||||
import { DexieTypingsTableSchema, TypingTableColumn } from './schema/typing';
|
||||
import { MessageEntity } from '../../../domain/entity/message';
|
||||
// import DexieMemory from 'dexie-in-memory';
|
||||
|
||||
// Database declaration (move this to its own module also)
|
||||
export const chatDatabase = new Dexie('chat-database-infra') as Dexie & {
|
||||
@@ -22,3 +23,4 @@ chatDatabase.version(1).stores({
|
||||
});
|
||||
|
||||
chatDatabase.message.mapToClass(MessageEntity)
|
||||
// Apply in-memory storage
|
||||
|
||||
Reference in New Issue
Block a user