message_edit: Check previous message content to prevent races.

Similar to group based setting values, we expect
the client to send the previous content alongwith
the edited content to the edit message endpoint.
We reject the request incase the previous content
doesn't match the current message content, which
could happen in case two users simultaneously edit
a message - which will be implemented in #33051.
This commit is contained in:
Kislay Verma
2025-04-05 19:53:19 +05:30
committed by Tim Abbott
parent 5b5be39b19
commit e2e0603689
11 changed files with 137 additions and 12 deletions

View File

@@ -20,6 +20,12 @@ format used by the Zulip server that they are interacting with.
## Changes in Zulip 11.0
**Feature level 379**
* [`PATCH /messages/{message_id}`](/api/update-message): Added
optional parameter `prev_content_sha256`, which clients can use to
prevent races with the message being edited by another client.
**Feature level 378**
* [`GET /events`](/api/get-events): Archiving and unarchiving