( queues: Record<string, QueuedMothershipMessage[]>, chatKey: string, next: QueuedMothershipMessage[] )
| 53 | } |
| 54 | |
| 55 | const setQueueForChat = ( |
| 56 | queues: Record<string, QueuedMothershipMessage[]>, |
| 57 | chatKey: string, |
| 58 | next: QueuedMothershipMessage[] |
| 59 | ): Record<string, QueuedMothershipMessage[]> => |
| 60 | next.length === 0 ? omitKey(queues, chatKey) : { ...queues, [chatKey]: next } |
| 61 | |
| 62 | // Drop the volatile `queuedSendHandoff` from the persisted snapshot — its |
| 63 | // stream reference is meaningless after reload; the dispatcher mints a fresh |