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
@@ -13,6 +13,7 @@ import { DirectMessageRepository } from '../../infrastructure/direct-message.rep
import { OfflineMessageQueueService } from './offline-message-queue.service';
import { PeerDeliveryService } from './peer-delivery.service';
import { AttachmentFacade } from '../../../attachment';
import { CustomEmojiService } from '../../../custom-emoji';
import {
advanceDirectMessageStatus,
createDirectConversation,
@@ -65,6 +66,7 @@ export class DirectMessageService {
private readonly offlineQueue = inject(OfflineMessageQueueService);
private readonly delivery = inject(PeerDeliveryService);
private readonly attachments = inject(AttachmentFacade);
private readonly customEmoji = inject(CustomEmojiService);
private readonly store = inject(Store);
private readonly router = inject(Router);
private readonly currentUser = this.store.selectSignal(selectCurrentUser);
@@ -694,6 +696,12 @@ export class DirectMessageService {
await this.persistConversation(ownerId, updatedConversation);
if (payload.type === 'edit' && payload.content) {
this.customEmoji.pushEmojisInContent(payload.content);
} else if (payload.type === 'reaction-add' && payload.reaction?.emoji) {
this.customEmoji.pushEmojisInContent(payload.reaction.emoji);
}
for (const recipientId of recipientIds) {
this.delivery.sendViaWebRTC(recipientId, {
type: 'direct-message-mutation',
@@ -761,6 +769,8 @@ export class DirectMessageService {
let sentCount = 0;
this.customEmoji.pushEmojisInContent(message.content);
for (const recipientId of recipientIds) {
if (this.delivery.sendViaWebRTC(recipientId, {
type: 'direct-message',