(d: TranscriptDraft)
| 121 | } |
| 122 | |
| 123 | function sealOpenMessages(d: TranscriptDraft) { |
| 124 | let copied = false; |
| 125 | for (const [, currentKey] of d.activeMessageKey) { |
| 126 | if (!d.sealedKeys.has(currentKey)) { |
| 127 | if (!copied) { |
| 128 | d.sealedKeys = new Set(d.sealedKeys); |
| 129 | copied = true; |
| 130 | } |
| 131 | d.sealedKeys.add(currentKey); |
| 132 | } |
| 133 | } |
| 134 | } |
| 135 | |
| 136 | function turnMapKey(channelKey: string, turnKey: string | number | null) { |
| 137 | return `${channelKey}:${turnKey ?? "unknown"}`; |
no test coverage detected