Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions backend/src/modules/chat/application/chat.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,8 @@ export class ChatService {
savedMessage.type || 'TEXT',

new Date(),

chat.ticketId, // Adicionado aqui
),
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ export interface CreateMessageNotificationDTO {

chatId: string;

ticketId?: string;

messageId: string;

contentPreview: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ export class ReceivedMessageListener {
chatId:
event.chatId,

ticketId:
event.ticketId,

messageId:
event.messageId,

Expand All @@ -75,6 +78,9 @@ export class ReceivedMessageListener {
chatId:
event.chatId,

ticketId: // Adicionado aqui para o frontend SSE
event.ticketId,

messageId:
event.messageId,

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ export class CreateMessageNotificationUseCase {
type: NotificationType.NEW_MESSAGE,

chatId: data.chatId,
ticketId: data.ticketId,
});

await this.notificationRepository.create(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,7 @@ export class ReceivedMessageNotificationEvent {
public readonly type: string,

public readonly createdAt: Date,

public readonly ticketId?: string,
) {}
}
Loading