Logo
Explore Help
Sign In
IntenseWebs/discourse
3
0
Fork 0
You've already forked discourse
mirror of https://github.com/discourse/discourse.git synced 2025-02-25 18:55:32 -06:00
Code Issues Packages Projects Releases Wiki Activity
Files
e6fdfcdcd25d4bf7f009079cace41d0e9ffe4791
discourse/plugins/chat/test/javascripts/helpers/chat-default-pretender.js

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

9 lines
255 B
JavaScript
Raw Normal View History

FEATURE: implements drafts for threads (#24483) This commit implements drafts for threads by adding a new `thread_id` column to `chat_drafts` table. This column is used to create draft keys on the frontend which are a compound key of the channel and the thread. If the draft is only for the channel, the key will be `c-${channelId}`, if for a thread: `c-${channelId}:t-${threadId}`. This commit also moves the draft holder from the service to the channel or thread model. The current draft can now always be accessed by doing: `channel.draft` or `thread.draft`. Other notable changes of this commit: - moves ChatChannel to gjs - moves ChatThread to gjs
2023-11-22 11:54:23 +01:00
export default function applyDefaultHandlers(helpers) {
this.post("/chat/api/channels/:channel_id/drafts", () =>
helpers.response({})
);
this.post("/chat/api/channels/:channel_id/threads/:thread_id/drafts", () =>
helpers.response({})
);
}
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.24.6 Page: 109ms Template: 1ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API