Skip to content
Open
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
11 changes: 9 additions & 2 deletions src/controllers/comments/comments.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,17 @@ export class CommentsController {
userId: userThatCommented.id, // needed for generic notification ports structure
},
);
} else if (entityDomain === 'task') {
this.messaging.postMessage(
'task-management-microservice.comment-in-task',
{
id: entityId,
user: userThatCommented,
comment: createdComment,
},
);
}

console.log({ createdComment });

return createdComment;
}

Expand Down
4 changes: 4 additions & 0 deletions src/services/messaging.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ export class MessagingService {
});
}

postMessage<R>(channel: string, payload: any): void {
return this.rabbitmq.publish<R>('bud', channel, payload);
}

/**
* Fire and forget a message to a rabbitmq topic.
*
Expand Down