Skip to content

Chat: edit, delete, moderation and reply with a quote #95

Closed

Description

@Oceandek

Parent

#91

What to build

  • Your own messages: edit them (shown "(edited)") and delete them (shown "This message was deleted.").
  • Moderation: any Teacher and the Superuser can delete any message.
  • Deleting removes the text and the files, but keeps the row so replies can say the original was deleted.
  • Reply with a quote: the reply shows a short quote of the original (author + first line) above it, and clicking the quote scrolls to the original. A quote of a deleted message says "This message was deleted.".
  • Live: edits and deletions appear live in open chats.

Spec stories 16-20.

Acceptance criteria

  • PUT /api/chat/messages/{id} (author only), DELETE /api/chat/messages/{id} (author or staff); reply_to_id on send (same chat only)
  • Changes since after include edited and deleted messages
  • Frontend: message menu (Edit, Delete, Reply), reply preview in the send box, quote with scroll-to
  • API and NiceGUI tests (edit, delete own, staff deletes, Student can't delete others', reply to deleted)

Blocked by

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    ready-for-agentFully specified, ready for an AFK agent

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions