mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
fix duplicate message
This commit is contained in:
@@ -5,7 +5,7 @@ import { MessageAttachmentFileType, MessageAttachmentSource } from "src/app/core
|
||||
|
||||
export const AttachmentTableSchema = z.object({
|
||||
$id: z.number().optional(), // local id
|
||||
$messageId: z.number(),
|
||||
$messageId: z.string(),
|
||||
attachmentId: z.string().optional(),
|
||||
file: z.instanceof(Blob),
|
||||
base64: zodDataUrlSchema.nullable().optional(),
|
||||
|
||||
@@ -3,7 +3,8 @@ import { MessageAttachmentFileType, MessageAttachmentSource } from 'src/app/core
|
||||
import { z } from 'zod';
|
||||
|
||||
export const MessageTableSchema = z.object({
|
||||
$id: z.number().optional(),
|
||||
$id: z.string().optional(),
|
||||
$createAt: z.number().optional(),
|
||||
id: z.string().uuid().optional(),
|
||||
roomId: z.string().uuid().optional(),
|
||||
message: z.string().nullable().optional(),
|
||||
@@ -48,5 +49,5 @@ export const MessageTableSchema = z.object({
|
||||
|
||||
export type MessageTable = z.infer<typeof MessageTableSchema>
|
||||
export type DexieMessageTable = EntityTable<MessageTable, '$id'>;
|
||||
export const messageTableColumn = '++$id, id, roomId, senderId, message, messageType, canEdit, oneShot, requireUnlock'
|
||||
export const messageTableColumn = '$id, id, roomId, senderId, message, messageType, canEdit, oneShot, requireUnlock'
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ import { BoldTableColumn, DexieBoldTable } from './instance/chat/schema/bold';
|
||||
|
||||
|
||||
// Database declaration (move this to its own module also)
|
||||
export const chatDatabase = new Dexie('chat-database-infra',{
|
||||
export const chatDatabase = new Dexie('chat-database-v1',{
|
||||
// indexedDB: new FDBFactory,
|
||||
// IDBKeyRange: FDBKeyRange, // Mocking IDBKeyRange
|
||||
}) as Dexie & {
|
||||
|
||||
Reference in New Issue
Block a user