events: Migrate plan_type & upload_quota to update_dict event format.

'realm_upload_quota_mib` is updated when `plan_type` changes.

Earlier, we were including 'upload_quota' to update
`realm_upload_quota_mib` in extra_data field of 'realm op: update'
event format when property='plan_type'.

This commit migrate those two parameters to `realm op: update_dict`
event format.

* None of the clients processes these fields, so no compatibility
  code required.
* Renamed `upload_quota` to `upload_quota_mib` as it better aligns
  with our goal to encode units in the client-facing API names.
  Also, it helps to avoid extra code to update 'realm_upload_quota_mib`
  in web client, web client simply aligns with
  'realm["realm_" + key] = value'.
This commit is contained in:
Prakhar Pratyush
2024-10-11 10:08:17 +05:30
committed by Tim Abbott
parent 417d74e032
commit 808acc9e47
9 changed files with 62 additions and 45 deletions

View File

@@ -20,6 +20,15 @@ format used by the Zulip server that they are interacting with.
## Changes in Zulip 10.0
**Feature level 306**
* [`GET /events`](/api/get-events): Removed the `extra_data` optional
field from the `realm/update` event format, which was only used for
`plan_type` events, with a single `upload_quota` field. Now, we use
a standard `realm/update_dict` event to notify clients about changes
in `plan_type` and other fields that atomically change with a given
change in plan.
**Feature level 305**
* [`POST /register`](/api/register-queue), [`GET /events`](/api/get-events),