feat: Add emoji and alot of other fixes
This commit is contained in:
@@ -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 } });
|
||||
|
||||
Reference in New Issue
Block a user