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.