diff --git a/src/EventSourcingDB/EventSourcingDB.js b/src/EventSourcingDB/EventSourcingDB.js index 0772f07..9987ba4 100644 --- a/src/EventSourcingDB/EventSourcingDB.js +++ b/src/EventSourcingDB/EventSourcingDB.js @@ -465,6 +465,7 @@ class EventSourcingDB extends EventEmitter { */ dispatch = makeDispatcher('dispatch', async (type, data, ts) => { const event = await this.queue.add(type, data, ts) + this.emit('dispatch', event) return this.handledVersion(event.v) })