diff --git a/Schema/SyncResponse.json b/Schema/SyncResponse.json new file mode 100644 index 0000000..a75f712 --- /dev/null +++ b/Schema/SyncResponse.json @@ -0,0 +1,105 @@ +{ + "guard": "TELODENDRIA_SCHEMA_SYNCRESPONSE_H", + "header": "Schema\/SyncResponse.h", + "types": { + "Event": { + "fields": { + "content": { + "type": "object", + "required": true + }, + "type": { + "type": "string", + "required": true + } + }, + "type": "struct" + }, + "AccountData": { + "fields": { + "events": { "type": "[Event]" } + }, + "type": "struct" + }, + "StrippedStateEvent": { + "fields": { + "events": { "type": "[Event]" } + }, + "type": "struct" + }, + "InviteState": { + "fields": { + "content": { + "type": "object", + "required": true + }, + "sender": { + "type": "string", + "required": true + }, + "state_key": { + "type": "string", + "required": true + }, + "type": { + "type": "string", + "required": true + } + }, + "type": "struct" + }, + "InvitedRooms": { + "fields": { + "invite_state": { "type": "InviteState" } + }, + "type": "struct" + }, + "ClientEventWithoutRoomID": { + "fields": { + "content": { "type": "object", "required": true }, + "event_id": { "type": "string", "required": true }, + "origin_server_ts": { "type": "integer", "required": true }, + "sender": { "type": "string", "required": true }, + "state_key": { "type": "string" }, + "type": { "type": "string", "required": true } + }, + "type": "struct" + }, + "Timeline": { + "fields": { + "events": { "type": "[ClientEventWithoutRoomID]", "required": true }, + "limited": { "type": "boolean" }, + "prev_batch": { "type": "string" } + }, + "type": "struct" + }, + "JoinedRooms": { + "fields": { + "timeline": { "type": "Timeline" } + }, + "type": "struct" + }, + "Rooms": { + "fields": { + "invite": { "type": "InvitedRooms" }, + "join": { "type": "JoinedRooms" } + }, + "type": "struct" + }, + "SyncResponse": { + "fields": { + "next_batch": { + "type": "string", + "required": true + }, + "account_data": { + "type": "AccountData" + }, + "rooms": { + "type": "Rooms" + } + }, + "type": "struct" + } + } +} diff --git a/src/Room.c b/src/Room.c index 6766773..87d9056 100644 --- a/src/Room.c +++ b/src/Room.c @@ -1812,9 +1812,7 @@ RoomAddEventV1(Room *room, PduV1 pdu) DbUnlock(room->db, event_ref); - /* TODO: Store DAG relationships, somehow. - * Also keep track of PDU depth. */ - + /* TODO: Store DAG relationships, somehow. */ pdu_json = PduV1ToJson(&pdu); { CommonID *sid= UserIdParse(pdu.sender, NULL);