import { atom } from 'jotai'; import { IContent } from 'matrix-js-sdk'; export type ScheduledMessage = { delayId: string; roomId: string; content: IContent; sendAt: number; // Unix timestamp ms }; /** * Global atom: Map * Stores all locally-tracked scheduled messages across rooms. * MSC4140 has no list endpoint, so we track them ourselves. */ export const scheduledMessagesAtom = atom>(new Map());