(event: StreamEvent)
| 139 | } |
| 140 | |
| 141 | private createEnvelope(event: StreamEvent): PersistedStreamEventEnvelope { |
| 142 | const seq = ++this.nextSeq |
| 143 | return createEvent({ |
| 144 | ...event, |
| 145 | streamId: this.streamId, |
| 146 | chatId: this.chatId, |
| 147 | cursor: String(seq), |
| 148 | seq, |
| 149 | requestId: this.requestId, |
| 150 | }) |
| 151 | } |
| 152 | |
| 153 | private queuePersistence(envelope: PersistedStreamEventEnvelope): void { |
| 154 | this.pendingEnvelopes.push(envelope) |