mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-21 13:55:51 +00:00
add database fields
This commit is contained in:
+4
-3
@@ -16,6 +16,7 @@ const tableSchema = z.object({
|
||||
messageType: z.number(),
|
||||
canEdit: z.boolean(),
|
||||
oneShot: z.boolean(),
|
||||
sentAt: z.string().optional(),
|
||||
requireUnlock: z.boolean(),
|
||||
sender: z.object({
|
||||
wxUserId: z.number(),
|
||||
@@ -49,7 +50,7 @@ export class MessageLocalDataSourceService {
|
||||
|
||||
messageDataSource.message.hook('creating', (primKey, obj, trans) => {
|
||||
// const newMessage = await trans.table('message').get(primKey);
|
||||
this.messageSubject.next(obj);
|
||||
this.messageSubject.next(obj);
|
||||
// return newMessage
|
||||
})
|
||||
}
|
||||
@@ -103,8 +104,8 @@ export class MessageLocalDataSourceService {
|
||||
}
|
||||
}
|
||||
|
||||
getItemsLive(roomId: string) {
|
||||
return liveQuery(() =>
|
||||
getItemsLive(roomId: string) {
|
||||
return liveQuery(() =>
|
||||
messageDataSource.message.where('roomId').equals(roomId).sortBy('id')
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user