Now edited messages are visible in the chats. Currently, it's only possible to edit the message (send a new message with edit_message type) from the database. Editing message
which is source of sidebar currently isn't visible in the sidebar view.
Details
- added edited message to the database, checked if it shows correctly,
- edited several times the same message, checked if the latest one is shown,
- edited a few messages in one thread, checked if the messages are updated correctly,
- edited a few messages in a few threads, checked if the messages are correctly updated
Diff Detail
- Repository
- rCOMM Comm
- Lint
No Lint Coverage - Unit
No Test Coverage
Event Timeline
Looks good to me, but I haven't worked with this code so it would be nice if someone else could also take a look.
accepting with one question inline
lib/selectors/chat-selectors.js | ||
---|---|---|
405 ↗ | (On Diff #23528) | Could we simply this condition to this? Or are we concerned about newText possibly being an empty string? |
Revert the changes
lib/selectors/chat-selectors.js | ||
---|---|---|
405 ↗ | (On Diff #23528) | I changed it, but then after more thought, I believe, that it should stay like this. If the newText is empty we would prefer to display an even empty message, than the original content (that is what the user would probably want). I revert the changes. We can consider preventing users from sending empty edit messages. But in the future, it would be easy to add deleting messages by sending edit messages with empty text. We would just not display them at all. |
We can consider preventing users from sending empty edit messages.
We should do this. We don't allow empty messages for messageTypes.TEXT. Can you create a follow-up Linear task for this before landing?