Ability to edit a long sent text

Expected behavior

A long sent text can be edited.

Actual behavior

A long sent text cannot be edited.

3 Likes
~~Looks like this is about editing messages sent a long time ago?~~

Same goes for deletion.

The way things currently are, the other chat participant is basically free to edit and delete the entire conversation from your device at any time.
While the deletion of all history could be considered a feature that e.g. also Telegram implements, editing doesn’t make sense. Especially since you cannot even see when the message has been edited.

Implementation

I think the implementation should be simple: when an edit or deletion request comes in to your device, just reject it if it’s for a message that is N hours old or older.
And the same goes for showing the “edit” button.
Although there can be synchronization issues if the edit request is delayed, i.e. you edit it on your device, but the other participant’s device later rejects the request when it’s delivered. For this case having a little time margin between the UI and the rejection should improve the situation. That is, show the “edit” button if the message is fresher than 24 hours, but reject the edit request if the message is older than 25 hours.

This can cause other problems if the recipient’s device is offline for a long time, and both both the message and the edit request come at the same time. Or maybe some other corner cases.
But the “edit” feature is, after all, for fixing happy little accidents like typos. It can’t be 100% fool-proof, because you just can’t force someone else’s device to delete something.

Other open-source E2EE messengers have probably figured this out though, so it’s probably better to look at their implementations rather than listen to me.

No, I’m talking about a long message I just sent — I made a typo in it, but I can’t fix it because long messages can’t be edited. There’s simply no such feature. And about the delay time — why make it so complicated? You’re communicating with a trusted person. Many developers and users somehow assume from the start that Delta Chat is meant for talking to scammers, enemies, and so on. Relax.

1 Like

The relevant code:

message.hasHtml is true for long messages.

Most likely, Delta Chat treats the long message as HTML, so one of the conditions isn’t met.