chore: Fix app
This commit is contained in:
+11
@@ -14,6 +14,7 @@ import { OfflineMessageQueueService } from './offline-message-queue.service';
|
||||
import { PeerDeliveryService } from './peer-delivery.service';
|
||||
import { AttachmentFacade } from '../../../attachment';
|
||||
import { CustomEmojiService } from '../../../custom-emoji';
|
||||
import { NotificationsFacade } from '../../../notifications';
|
||||
import { SignalServerCredentialStoreService } from '../../../authentication/application/services/signal-server-credential-store.service';
|
||||
import {
|
||||
advanceDirectMessageStatus,
|
||||
@@ -72,6 +73,7 @@ export class DirectMessageService {
|
||||
private readonly credentialStore = inject(SignalServerCredentialStoreService);
|
||||
private readonly store = inject(Store);
|
||||
private readonly router = inject(Router);
|
||||
private readonly notifications = inject(NotificationsFacade);
|
||||
private readonly currentUser = this.store.selectSignal(selectCurrentUser);
|
||||
private readonly conversationsSignal = signal<DirectMessageConversation[]>([]);
|
||||
private readonly selectedConversationIdSignal = signal<string | null>(null);
|
||||
@@ -544,6 +546,15 @@ export class DirectMessageService {
|
||||
updatedAt: Date.now()
|
||||
});
|
||||
|
||||
if (incomingMessage.kind !== 'system' && !incomingMessage.isDeleted) {
|
||||
void this.notifications.handleIncomingDirectMessage({
|
||||
id: incomingMessage.id,
|
||||
senderName: sender.displayName || sender.username || sender.userId,
|
||||
content: incomingMessage.content,
|
||||
conversationVisible: !shouldIncrementUnread
|
||||
});
|
||||
}
|
||||
|
||||
if (!shouldIncrementUnread) {
|
||||
await this.markRead(conversationId);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user