feat: Add emoji and alot of other fixes

This commit is contained in:
2026-06-05 05:40:18 +02:00
parent ca069e2f61
commit 6865147e8f
72 changed files with 3885 additions and 413 deletions
@@ -6,6 +6,7 @@ import {
Reaction,
BanEntry
} from '../../shared-kernel';
import type { CustomEmoji } 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';
@@ -203,6 +204,18 @@ export class ElectronDatabaseService {
return this.api.query<any[]>({ type: 'get-all-attachments', payload: {} });
}
saveCustomEmoji(emoji: CustomEmoji): Promise<void> {
return this.api.command({ type: 'save-custom-emoji', payload: { emoji } });
}
getCustomEmojis(): Promise<CustomEmoji[]> {
return this.api.query<CustomEmoji[]>({ type: 'get-custom-emojis', payload: {} });
}
deleteCustomEmoji(emojiId: string): Promise<void> {
return this.api.command({ type: 'delete-custom-emoji', payload: { emojiId } });
}
/** Delete all attachment records for a message. */
deleteAttachmentsForMessage(messageId: string): Promise<void> {
return this.api.command({ type: 'delete-attachments-for-message', payload: { messageId } });