Remove prev_batch

It wasn't particulalry useful for clients, and doesn't help equivocation much.
kegan/persist-edu
Kegan Dougal 3 months ago committed by GitHub
parent 57ccc48805
commit 94b1a875db
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -53,8 +53,8 @@ with a valid value makes the event “sticky”[^stickyobj]. Valid values are th
This key can be set by clients in the CS API by a new query parameter `stick_duration_ms`, which is This key can be set by clients in the CS API by a new query parameter `stick_duration_ms`, which is
added to the following endpoints: added to the following endpoints:
* `PUT /\_matrix/client/v3/rooms/{roomId}/send/{eventType}/{txnId}` * `PUT /_matrix/client/v3/rooms/{roomId}/send/{eventType}/{txnId}`
* `PUT /\_matrix/client/v3/rooms/{roomId}/state/{eventType}/{stateKey}` * `PUT /_matrix/client/v3/rooms/{roomId}/state/{eventType}/{stateKey}`
To calculate if any sticky event is still sticky: To calculate if any sticky event is still sticky:
@ -97,33 +97,28 @@ The new sync section looks like:
"ephemeral": { ... }, "ephemeral": { ... },
"state": { ... }, "state": { ... },
"timeline": { ... }, "timeline": { ... },
"sticky_events": [ "sticky_events": {
{ "events": [
"event": { {
"sender": "@bob:example.com", "sender": "@bob:example.com",
"type": "m.foo", "type": "m.foo",
"sticky": { "sticky": {
"duration_ms": 300000 "duration_ms": 300000
}, },
"origin_server_ts": 1757920344000, "origin_server_ts": 1757920344000,
"content": { ... } "content": { ... }
}, },
"prev_batch": "s1234_5678_90123" {
}, "sender": "@alice:example.com",
{ "type": "m.foo",
"event": { "sticky": {
"sender": "@alice:example.com", "duration_ms": 300000
"type": "m.foo", },
"sticky": { "origin_server_ts": 1757920311020,
"duration_ms": 300000 "content": { ... }
}, }
"origin_server_ts": 1757920311020, ]
"content": { ... } }
},
"prev_batch": "s1234_5678_90125"
}
],
}
} }
} }
} }
@ -134,10 +129,8 @@ Over Simplified Sliding Sync, Sticky Events have their own extension `sticky_eve
```json ```json
{ {
"rooms": { "rooms": {
"!726s6s6q:example.com": [ "!726s6s6q:example.com": {
{ "events": [{
"prev_batch": "s1234_5678_90125",
"event": {
"sender": "@bob:example.com", "sender": "@bob:example.com",
"type": "m.foo", "type": "m.foo",
"sticky": { "sticky": {
@ -145,9 +138,8 @@ Over Simplified Sliding Sync, Sticky Events have their own extension `sticky_eve
}, },
"origin_server_ts": 1757920344000, "origin_server_ts": 1757920344000,
"content": { ... } "content": { ... }
} }]
} }
]
} }
} }
``` ```

Loading…
Cancel
Save