Keep Postvak and Meelezen replies as concepts #468
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "postvak-reply-drafts"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
A reply typed in the Postvak or Meelezen lived in localStorage only. Once its message was marked read, the row closed and took the composer with it, so the text was unreachable. It is now a server-side concept, like a card reply, listed in "Concepten" and finished from there.
Backend
outgoing_postsdraft carrying its thread inroot_id(the column a scheduled Postvak reply already uses). One per thread: new partial unique indexux_outgoing_one_reply_draft_per_threadon(user_id, account_id, root_id) WHERE state = 'draft' AND card_id IS NULL AND root_id IS NOT NULL. Rolling-safe: the app creates no such rows today.GET/PUT/DELETE /api/mm/reply-draft(tagdrafts). Saving makes no Mattermost call; the thread is checked at send time, as before. A save that loses the race to create the row writes onto the winner's.DraftReadnow carriesaccount_id,channel_idandroot_id.root_id. Opened in the new-message composer it would be sent at channel level, outside its thread.Frontend
postvak:<account>:<root>), so it answers the same concept whichever message of the thread it was opened under.useServerDraftSynctakes the owner (card or thread) instead of a card id.PostvakReplyDialog: the thread as context, then the sameReplyComposer. Sending or scheduling there consumes the concept; the discard goes through the reply-draft route.Checked
test_postvak_reply_draft.pyplus a migration check on the index predicate.Notes
post:<id>key and are not migrated.CHANGELOG.mdandfrontend/src/content/releases/unreleased.md(both new under Unreleased). Whichever merges second needs a rebase.View command line instructions
Manual merge helper
Use this merge commit message when completing the merge manually.
Checkout
From your project repository, check out a new branch and test the changes.