WhatsApp System Design
Edit Message
2 min read
Editing works very similarly.
The message is not sent again.
Instead,
the application generates an Edit Event.
Flow
The event contains something similar to
Message ID
Edited Text
Timestamp
The recipient looks up the existing message using the Message ID
and updates it locally.
Why Not Delete + Send Again?
Imagine someone replies to your message.
If the original message were deleted,
every reply would break.
Keeping the same Message ID preserves
-
Replies
-
Reactions
-
Read Status
-
Delivery Status
Only the message content changes.
Versioning
Many messaging systems internally maintain versions.
Example
Version 1
Hello
ā
Version 2
Hello Everyone
ā
Version 3
Hello Team
The user only sees the latest version,
while the backend may retain edit history depending on product requirements.
Interview Notes
Interviewer
How can the recipient update the correct message?
Answer
The Edit Event references the existing Message ID.
The recipient simply updates that record locally.
Key Takeaways
ā Editing does not require sending a new message.
ā Message IDs remain unchanged.
ā Replies and reactions continue working.
ā Edit operations are lightweight events.