chatmail / chatmail/core

Don't apply stale message edits

Open
#7,715 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
929
Forks
143
Avg merge
1d 20h
Merged PRs (30d)
53

Description

This is a follow-up to discussion in https://github.com/chatmail/core/issues/6806#issuecomment-3005608761

Steps to reproduce the bug:
- Send a message from device A and receive it on device B
- Disconnect device A from network
- Edit the message on both devices in different ways
- Connect device A to network and see that the devices have exchanged their edits

The expected behavior is that the last edit wins on both devices. A suggested fix is to rename `Param::IsEdited` to `EditTimestamp` and store the edit "sent" timestamp there instead of 0/1. This change is backward-compatible. If only one device is updated to the fixed version, it will reject stale edits, but devices running old versions will still apply all edits, this is not worse than the current behavior.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.