nextcloud / nextcloud/spreed

Prevent people from accidently deleting a message

Open
#5,300 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement feature: chat 💬 feature: frontend 🖌️ medium
Dominant language
PHP
Stars
2.2k
Forks
587
Avg merge
18h 27m
Merged PRs (30d)
333

Description

I just tested the new "delete messages" feature and it works really nice. Also quotations update in (nearly) real-time... Really nice!

I just wonder how long it takes until someone deletes an important message by accident. Maybe it makes sense to add a simple undo function in the future?

My initial idea: Don't send the delete request to the server directly. Instead first replace the chat message with something like:

Message will be deleted in 5 seconds [undo]

The 5 seconds count down 5,4,3,2,1,0 and than the delete request is send to the server and the operation is finished. If the user clicks on "undo" before, the operation gets intercepted, nothing was send to the server and the original chat messages appears again.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start from the chat message deletion UI and the delete request path described in the issue body. Verify how deletion and message restoration currently work, then implement the five-second countdown with an undo action; done means the server request is delayed, undo prevents it, and the original message returns.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
backend, frontend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.