Fixed MentionSendingService listening to events multiple times in tests

no issue
This commit is contained in:
Simon Backx 2023-03-07 11:24:02 +01:00
parent 4147663cde
commit b2e00221e1

View File

@ -26,7 +26,12 @@ function getPostUrl(post) {
module.exports = {
controller: new MentionController(),
didInit: false,
async init() {
if (this.didInit) {
return;
}
this.didInit = true;
const repository = new BookshelfMentionRepository({
MentionModel: models.Mention,
DomainEvents
@ -97,6 +102,6 @@ module.exports = {
}
}
});
sendingService.listen(events);
sendingService.listen(events);
}
};