Unify v1 and v2 event schemas
This commit is contained in:
parent
d2185d11df
commit
aa4ed10821
35 changed files with 88 additions and 110 deletions
|
@ -13,5 +13,5 @@
|
|||
"event_id": "$WLGTSEFSEF:localhost",
|
||||
"type": "m.call.answer",
|
||||
"room_id": "!Cuyf34gef24t:localhost",
|
||||
"user_id": "@example:localhost"
|
||||
"sender": "@example:localhost"
|
||||
}
|
||||
|
|
|
@ -15,5 +15,5 @@
|
|||
"event_id": "$WLGTSEFSEF:localhost",
|
||||
"type": "m.call.candidates",
|
||||
"room_id": "!Cuyf34gef24t:localhost",
|
||||
"user_id": "@example:localhost"
|
||||
"sender": "@example:localhost"
|
||||
}
|
||||
|
|
|
@ -8,5 +8,5 @@
|
|||
"event_id": "$WLGTSEFSEF:localhost",
|
||||
"type": "m.call.hangup",
|
||||
"room_id": "!Cuyf34gef24t:localhost",
|
||||
"user_id": "@example:localhost"
|
||||
"sender": "@example:localhost"
|
||||
}
|
||||
|
|
|
@ -13,5 +13,5 @@
|
|||
"event_id": "$WLGTSEFSEF:localhost",
|
||||
"type": "m.call.invite",
|
||||
"room_id": "!Cuyf34gef24t:localhost",
|
||||
"user_id": "@example:localhost"
|
||||
"sender": "@example:localhost"
|
||||
}
|
||||
|
|
|
@ -8,5 +8,5 @@
|
|||
"event_id": "$WLGTSEFSEF:localhost",
|
||||
"type": "m.room.aliases",
|
||||
"room_id": "!Cuyf34gef24t:localhost",
|
||||
"user_id": "@example:localhost"
|
||||
"sender": "@example:localhost"
|
||||
}
|
||||
|
|
|
@ -14,5 +14,5 @@
|
|||
"type": "m.room.avatar",
|
||||
"state_key": "",
|
||||
"room_id": "!Cuyf34gef24t:localhost",
|
||||
"user_id": "@example:localhost"
|
||||
"sender": "@example:localhost"
|
||||
}
|
||||
|
|
|
@ -8,5 +8,5 @@
|
|||
"event_id": "$WLGTSEFSEF:localhost",
|
||||
"type": "m.room.canonical_alias",
|
||||
"room_id": "!Cuyf34gef24t:localhost",
|
||||
"user_id": "@example:localhost"
|
||||
"sender": "@example:localhost"
|
||||
}
|
||||
|
|
|
@ -8,5 +8,5 @@
|
|||
"event_id": "$WLGTSEFSEF:localhost",
|
||||
"type": "m.room.create",
|
||||
"room_id": "!Cuyf34gef24t:localhost",
|
||||
"user_id": "@example:localhost"
|
||||
"sender": "@example:localhost"
|
||||
}
|
||||
|
|
|
@ -8,5 +8,5 @@
|
|||
"event_id": "$WLGTSEFSEG:localhost",
|
||||
"type": "m.room.guest_access",
|
||||
"room_id": "!Cuyf34gef24u:localhost",
|
||||
"user_id": "@example:localhost"
|
||||
"sender": "@example:localhost"
|
||||
}
|
||||
|
|
|
@ -8,5 +8,5 @@
|
|||
"event_id": "$WLGTSEFSEF:localhost",
|
||||
"type": "m.room.history_visibility",
|
||||
"room_id": "!Cuyf34gef24t:localhost",
|
||||
"user_id": "@example:localhost"
|
||||
"sender": "@example:localhost"
|
||||
}
|
||||
|
|
|
@ -8,5 +8,5 @@
|
|||
"event_id": "$WLGTSEFSEF:localhost",
|
||||
"type": "m.room.join_rules",
|
||||
"room_id": "!Cuyf34gef24t:localhost",
|
||||
"user_id": "@example:localhost"
|
||||
"sender": "@example:localhost"
|
||||
}
|
||||
|
|
|
@ -26,5 +26,5 @@
|
|||
"event_id": "$WLGTSEFSEF:localhost",
|
||||
"type": "m.room.member",
|
||||
"room_id": "!Cuyf34gef24t:localhost",
|
||||
"user_id": "@example:localhost"
|
||||
"sender": "@example:localhost"
|
||||
}
|
||||
|
|
|
@ -26,5 +26,5 @@
|
|||
"event_id": "$WLGTSEFSEF:localhost",
|
||||
"type": "m.room.member",
|
||||
"room_id": "!Cuyf34gef24t:localhost",
|
||||
"user_id": "@example:localhost"
|
||||
"sender": "@example:localhost"
|
||||
}
|
||||
|
|
|
@ -21,5 +21,5 @@
|
|||
"event_id": "$WLGTSEFSEF:localhost",
|
||||
"type": "m.room.member",
|
||||
"room_id": "!Cuyf34gef24t:localhost",
|
||||
"user_id": "@example:localhost"
|
||||
"sender": "@example:localhost"
|
||||
}
|
||||
|
|
|
@ -14,5 +14,5 @@
|
|||
"origin_server_ts": 1432735824653,
|
||||
"room_id": "!jEsUZKDJdhlrceRyVU:localhost",
|
||||
"type": "m.room.message",
|
||||
"user_id": "@example:localhost"
|
||||
}
|
||||
"sender": "@example:localhost"
|
||||
}
|
||||
|
|
|
@ -8,5 +8,5 @@
|
|||
"event_id": "$WLGTSEFSEF:localhost",
|
||||
"type": "m.room.message",
|
||||
"room_id": "!Cuyf34gef24t:localhost",
|
||||
"user_id": "@example:localhost"
|
||||
"sender": "@example:localhost"
|
||||
}
|
||||
|
|
|
@ -14,5 +14,5 @@
|
|||
"origin_server_ts": 1432735824653,
|
||||
"room_id": "!jEsUZKDJdhlrceRyVU:localhost",
|
||||
"type": "m.room.message",
|
||||
"user_id": "@example:localhost"
|
||||
}
|
||||
"sender": "@example:localhost"
|
||||
}
|
||||
|
|
|
@ -15,5 +15,5 @@
|
|||
"event_id": "$WLGTSEFSEF:localhost",
|
||||
"type": "m.room.message",
|
||||
"room_id": "!Cuyf34gef24t:localhost",
|
||||
"user_id": "@example:localhost"
|
||||
"sender": "@example:localhost"
|
||||
}
|
||||
|
|
|
@ -16,5 +16,5 @@
|
|||
"origin_server_ts": 1432735824653,
|
||||
"room_id": "!jEsUZKDJdhlrceRyVU:localhost",
|
||||
"type": "m.room.message",
|
||||
"user_id": "@example:localhost"
|
||||
"sender": "@example:localhost"
|
||||
}
|
||||
|
|
|
@ -8,5 +8,5 @@
|
|||
"event_id": "$WLGTSEFSEF:localhost",
|
||||
"type": "m.room.message",
|
||||
"room_id": "!Cuyf34gef24t:localhost",
|
||||
"user_id": "@example:localhost"
|
||||
"sender": "@example:localhost"
|
||||
}
|
||||
|
|
|
@ -8,5 +8,5 @@
|
|||
"event_id": "$WLGTSEFSEF:localhost",
|
||||
"type": "m.room.message",
|
||||
"room_id": "!Cuyf34gef24t:localhost",
|
||||
"user_id": "@example:localhost"
|
||||
"sender": "@example:localhost"
|
||||
}
|
||||
|
|
|
@ -23,5 +23,5 @@
|
|||
"origin_server_ts": 1432735824653,
|
||||
"room_id": "!jEsUZKDJdhlrceRyVU:localhost",
|
||||
"type": "m.room.message",
|
||||
"user_id": "@example:localhost"
|
||||
}
|
||||
"sender": "@example:localhost"
|
||||
}
|
||||
|
|
|
@ -8,5 +8,5 @@
|
|||
"event_id": "$WLGTSEFSEF:localhost",
|
||||
"type": "m.room.message.feedback",
|
||||
"room_id": "!Cuyf34gef24t:localhost",
|
||||
"user_id": "@example:localhost"
|
||||
"sender": "@example:localhost"
|
||||
}
|
||||
|
|
|
@ -8,5 +8,5 @@
|
|||
"event_id": "$WLGTSEFSEF:localhost",
|
||||
"type": "m.room.name",
|
||||
"room_id": "!Cuyf34gef24t:localhost",
|
||||
"user_id": "@example:localhost"
|
||||
"sender": "@example:localhost"
|
||||
}
|
||||
|
|
|
@ -20,5 +20,5 @@
|
|||
"event_id": "$WLGTSEFSEF:localhost",
|
||||
"type": "m.room.power_levels",
|
||||
"room_id": "!Cuyf34gef24t:localhost",
|
||||
"user_id": "@example:localhost"
|
||||
"sender": "@example:localhost"
|
||||
}
|
||||
|
|
|
@ -8,5 +8,5 @@
|
|||
"type": "m.room.redaction",
|
||||
"room_id": "!Cuyf34gef24t:localhost",
|
||||
"redacts": "!fukweghifu23:localhost",
|
||||
"user_id": "@example:localhost"
|
||||
"sender": "@example:localhost"
|
||||
}
|
||||
|
|
|
@ -8,5 +8,5 @@
|
|||
"event_id": "$WLGTSEFSEF:localhost",
|
||||
"type": "m.room.topic",
|
||||
"room_id": "!Cuyf34gef24t:localhost",
|
||||
"user_id": "@example:localhost"
|
||||
"sender": "@example:localhost"
|
||||
}
|
||||
|
|
|
@ -4,4 +4,4 @@
|
|||
"content": {
|
||||
"user_ids": ["@alice:matrix.org", "@bob:example.com"]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,23 +1,41 @@
|
|||
{
|
||||
"type": "object",
|
||||
"title": "Room Event",
|
||||
"description": "In addition to the Event fields, Room Events MUST have the following additional field.",
|
||||
"description": "In addition to the Event fields, Room Events may have the following additional fields.",
|
||||
"allOf":[{
|
||||
"$ref": "event.json"
|
||||
}],
|
||||
"properties": {
|
||||
"room_id": {
|
||||
"type": "string",
|
||||
"description": "The ID of the room associated with this event."
|
||||
},
|
||||
"event_id": {
|
||||
"type": "string",
|
||||
"description": "The globally unique event identifier."
|
||||
"description": "Required. The globally unique event identifier."
|
||||
},
|
||||
"user_id": {
|
||||
"room_id": {
|
||||
"type": "string",
|
||||
"description": "Contains the fully-qualified ID of the user who *sent* this event."
|
||||
"description": "Required. The ID of the room associated with this event."
|
||||
},
|
||||
"sender": {
|
||||
"type": "string",
|
||||
"description": "Required. Contains the fully-qualified ID of the user who *sent* this event."
|
||||
},
|
||||
"unsigned": {
|
||||
"type": "object",
|
||||
"description": "Contains optional extra information about the event.",
|
||||
"properties": {
|
||||
"age": {
|
||||
"type": "integer",
|
||||
"description": "The time in milliseconds that has elapsed since the event was sent"
|
||||
},
|
||||
"redacted_because": {
|
||||
"type": "string",
|
||||
"description": "The reason this event was redacted, if it was redacted"
|
||||
},
|
||||
"transaction_id": {
|
||||
"type": "string",
|
||||
"description": "The client-supplied transaction ID, if the client being given the event is the same one which sent it."
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": ["room_id"]
|
||||
"required": ["event_id", "room_id", "sender"]
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue