you can make a message blank by editing it
What happened?
You can make a message blank by editing the text, removing its contents and then inserting a new line.
To reproduce:
- Send a message
- Edit the message, removing its contents and adding a new line.
- Save the edited message
Expected results: Nothing will happen.
Actual results: Makes the message have no content or blank.
Demonstration:
https://user-images.githubusercontent.com/114207889/236130708-c0548c1b-0218-46b7-8b09-414b57964bdb.mp4
Branch
Production (app.revolt.chat)
Commit hash
c426b6c
What browsers are you seeing the problem on?
No response
Relevant log output
No response
Desktop
- [ ] Yes, this bug is specific to Revolt Desktop and is not an issue with Revolt Desktop itself.
PWA
- [ ] Yes, this bug is specific to the PWA.
I feel like this isn't a bug?
Might make sense to show a prompt asking the user if they want to delete the message?
Might make sense to show a prompt asking the user if they want to delete the message?
yes, it is supposed to show the 'delete message' prompt if you edit a message and remove everything in the message youre editing. in this case it does not.
- Technically there is something there, it's just blank
- I think there is a valid use case for being able to remove a caption from an image without deleting and reposting it, but hmmm
I would think having a delete message prompt with the option to save without text would make the most sense, and do a trim on the message content when checking to display the dialog so if it's just whitespace it still triggers.