set last message

This commit is contained in:
Peter Maquiran
2024-09-10 16:01:51 +01:00
parent f77592d0c4
commit 9fee233d91
23 changed files with 268 additions and 126 deletions
@@ -13,6 +13,20 @@ export class RoomLocalRepository extends DexieRepository<RoomTable, RoomTable> i
constructor() {
super(chatDatabase.room, RoomTableSchema)
// chatDatabase.room.hook('creating', (primaryKey, obj, transaction) => {
// if(obj.messages?.[0].attachments?.[0]) {
// delete obj.messages[0].attachments[0].file
// }
// });
// chatDatabase.room.hook('updating', (modifications, primKey, obj, transaction) => {
// if((modifications as Partial<RoomTable>).messages?.[0].attachments?.[0]) {
// delete (modifications as Partial<RoomTable>).messages[0].attachments[0].file
// }
// return modifications
// });
}
getItemsLive() {