Save draft of chat message

AI-generated summary

A discussion is underway about implementing a draft feature for chat messages in Discourse, similar to how drafts work for topics. oshyan suggests auto-saving chat messages and displaying a “drafts” indicator, while erlend_sh thinks this could be achieved using the existing drafts system. However, markvanlan notes that the existing system cannot be used, and proposes two alternatives: local drafts stored in the browser or full-blown persistent drafts. erlend_sh agrees to start with local storage.

Requesting drafts for chat as well (auto-save anything typed in chat message composer). Slack does this, and Discourse is already really good with drafts. It should either just transparently save and then show a “drafts 1” message on the channel or something (in sidebar or other channel list), or at least it should just prompt the user not to navigate away without sending anything they’ve typed or it will be lost. Since Discourse already does drafts well, I’d vote for the first option and have chat also have draft functionality.

3 Likes

Agreed. Can we get most of this for free through our existing drafts system @markvanlan ?

Though not a requirement for drafts in chat, if we’re gonna dive into it anyhow, I would love to revisit the ability to make multiple topic drafts (1) (2). We have a dedicated space for it already anyhow:

4 Likes

I don’t think we can use the existing draft system unfortunately. A really simple version of this would be local drafts; they aren’t stored on the server but your browser stores a draft for each channel. Would you like to start there, or just go full-blown persistent drafts from the start?

4 Likes

Local storage will suffice to start with :+1:

4 Likes

We have basic support for drafts now