function readDraft
readDraft(userId: string | undefined): StoredDraft

Returns the stored draft of userId, or an empty one when there is none, userId is undefined, or storage is blocked.

Parameters

userId: string | undefined

Return Type

Usage

import { readDraft } from "src/utils/chat/draft.ts";