Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Empty sync response could be more empty #6579

@bmarty

Description

@bmarty

Currently an empty sync response (i.e. without any change) is like that (with formatting added):

{
  "account_data": {
    "events": []
  },
  "to_device": {
    "events": []
  },
  "device_lists": {
    "changed": [],
    "left": []
  },
  "presence": {
    "events": []
  },
  "rooms": {
    "join": {},
    "invite": {},
    "leave": {}
  },
  "groups": {
    "join": {},
    "invite": {},
    "leave": {}
  },
  "device_one_time_keys_count": {
    "signed_curve25519": 50
  },
  "next_batch": "s1195808412_757269739_794431_REDACTED_1021253_37912961_19608850_66812"
}

According to the spec, only next_batch is required, so it could be acceptable to reduce it to:

{
  "next_batch": "s1195808412_757269739_794431_REDACTED_1021253_37912961_19608850_66812"
}

I do not know if it will solve the global climat changing problem, but if it's easy to fix, let's save some bytes!

Metadata

Metadata

Assignees

No one assigned

    Labels

    T-TaskRefactoring, removal, replacement, enabling or disabling functionality, other engineering tasks.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions