/sync: Put state dict back to being a list
Turning the state into a dict-of-dicts caused more pain than it solved. Put it back to a list.
This commit is contained in:
parent
6653362f31
commit
d7d59d78e1
2 changed files with 13 additions and 30 deletions
|
@ -1,12 +0,0 @@
|
||||||
{
|
|
||||||
"type": "object",
|
|
||||||
"additionalProperties": {
|
|
||||||
"type": "object",
|
|
||||||
"x-pattern": "$EVENT_TYPE",
|
|
||||||
"additionalProperties": {
|
|
||||||
"type": "object",
|
|
||||||
"x-pattern": "$STATE_KEY",
|
|
||||||
"allOf": [{"$ref": "event.json" }]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -114,7 +114,7 @@ paths:
|
||||||
``timeline``, if ``since`` is not given, or
|
``timeline``, if ``since`` is not given, or
|
||||||
``full_state`` is true).
|
``full_state`` is true).
|
||||||
allOf:
|
allOf:
|
||||||
- $ref: "definitions/state_batch.json"
|
- $ref: "definitions/event_batch.json"
|
||||||
timeline:
|
timeline:
|
||||||
title: Timeline
|
title: Timeline
|
||||||
type: object
|
type: object
|
||||||
|
@ -158,7 +158,7 @@ paths:
|
||||||
delta against the archived ``state`` not the
|
delta against the archived ``state`` not the
|
||||||
``invite_state``.
|
``invite_state``.
|
||||||
allOf:
|
allOf:
|
||||||
- $ref: "definitions/state_batch.json"
|
- $ref: "definitions/event_batch.json"
|
||||||
leave:
|
leave:
|
||||||
title: Left rooms
|
title: Left rooms
|
||||||
type: object
|
type: object
|
||||||
|
@ -174,7 +174,7 @@ paths:
|
||||||
description: |-
|
description: |-
|
||||||
The state updates for the room up to the start of the timeline.
|
The state updates for the room up to the start of the timeline.
|
||||||
allOf:
|
allOf:
|
||||||
- $ref: "definitions/state_batch.json"
|
- $ref: "definitions/event_batch.json"
|
||||||
timeline:
|
timeline:
|
||||||
title: Timeline
|
title: Timeline
|
||||||
type: object
|
type: object
|
||||||
|
@ -207,8 +207,8 @@ paths:
|
||||||
"join": {
|
"join": {
|
||||||
"!726s6s6q:example.com": {
|
"!726s6s6q:example.com": {
|
||||||
"state": {
|
"state": {
|
||||||
"m.room.member": {
|
"events": [
|
||||||
"@alice:example.com": {
|
{
|
||||||
"sender": "@alice:example.com",
|
"sender": "@alice:example.com",
|
||||||
"type": "m.room.member",
|
"type": "m.room.member",
|
||||||
"state_key": "@alice:example.com",
|
"state_key": "@alice:example.com",
|
||||||
|
@ -216,7 +216,7 @@ paths:
|
||||||
"origin_server_ts": 1417731086795,
|
"origin_server_ts": 1417731086795,
|
||||||
"event_id": "$66697273743031:example.com"
|
"event_id": "$66697273743031:example.com"
|
||||||
}
|
}
|
||||||
}
|
]
|
||||||
},
|
},
|
||||||
"timeline": {
|
"timeline": {
|
||||||
"events": [
|
"events": [
|
||||||
|
@ -248,7 +248,6 @@ paths:
|
||||||
"ephemeral": {
|
"ephemeral": {
|
||||||
"events": [
|
"events": [
|
||||||
{
|
{
|
||||||
"room_id": "!726s6s6q:example.com",
|
|
||||||
"type": "m.typing",
|
"type": "m.typing",
|
||||||
"content": {"user_ids": ["@alice:example.com"]}
|
"content": {"user_ids": ["@alice:example.com"]}
|
||||||
}
|
}
|
||||||
|
@ -259,24 +258,20 @@ paths:
|
||||||
"invite": {
|
"invite": {
|
||||||
"!696r7674:example.com": {
|
"!696r7674:example.com": {
|
||||||
"invite_state": {
|
"invite_state": {
|
||||||
"m.room.name": {
|
"events": [
|
||||||
"": {
|
{
|
||||||
"sender": "@alice:example.com",
|
"sender": "@alice:example.com",
|
||||||
"type": "m.room.name",
|
"type": "m.room.name",
|
||||||
"state_key": "",
|
"state_key": "",
|
||||||
"content": {"name": "My Room Name"},
|
"content": {"name": "My Room Name"}
|
||||||
"event_id": "$asdkgjrsfg2314375:example.com"
|
},
|
||||||
}
|
{
|
||||||
},
|
|
||||||
"m.room.member": {
|
|
||||||
"@bob:example.com": {
|
|
||||||
"sender": "@alice:example.com",
|
"sender": "@alice:example.com",
|
||||||
"type": "m.room.member",
|
"type": "m.room.member",
|
||||||
"state_key": "@bob:example.com",
|
"state_key": "@bob:example.com",
|
||||||
"content": {"membership": "invite"},
|
"content": {"membership": "invite"}
|
||||||
"event_id": "$257kasjdg315324akhg:example.com"
|
|
||||||
}
|
}
|
||||||
}
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue