wip: optimizations
This commit is contained in:
@@ -8,6 +8,7 @@ import {
|
||||
} from '../../shared-kernel';
|
||||
import type { ElectronApi } from '../../core/platform/electron/electron-api.models';
|
||||
import { ElectronBridgeService } from '../../core/platform/electron/electron-bridge.service';
|
||||
import type { RoomMessageStats } from './database.service';
|
||||
|
||||
/**
|
||||
* Database service for the Electron (desktop) runtime.
|
||||
@@ -63,6 +64,10 @@ export class ElectronDatabaseService {
|
||||
return this.api.query<Message[]>({ type: 'get-messages-since', payload: { roomId, sinceTimestamp } });
|
||||
}
|
||||
|
||||
getRoomMessageStats(roomId: string): Promise<RoomMessageStats> {
|
||||
return this.api.query<RoomMessageStats>({ type: 'get-room-message-stats', payload: { roomId } });
|
||||
}
|
||||
|
||||
/** Permanently delete a message by ID. */
|
||||
deleteMessage(messageId: string): Promise<void> {
|
||||
return this.api.command({ type: 'delete-message', payload: { messageId } });
|
||||
|
||||
Reference in New Issue
Block a user