Fix event schema examples too

This includes a fix for converting files like 'm.room.member$invite_room_state.yaml'
to be loaded correctly (we split on the dollar sign, which loses the file extension).
pull/3114/head
Travis Ralston 3 years ago
parent 8ccff0b4a0
commit 4f6338450b

@ -1,5 +1,5 @@
{
"$ref": "m.room.member",
"$ref": "m.room.member.yaml",
"content": {
"membership": "invite",
"avatar_url": "mxc://example.org/SEsfnsuifSDFSSEF",

@ -1,5 +1,5 @@
{
"$ref": "m.room.member",
"$ref": "m.room.member.yaml",
"content": {
"membership": "invite",
"avatar_url": "mxc://example.org/SEsfnsuifSDFSSEF",

@ -1,6 +0,0 @@
Checking the event schemas
==========================
To validate the event schemas, and check the example events, run
./check-examples.py

@ -1,6 +0,0 @@
{
"content": {
"key": "value"
},
"type": "org.example.custom.event"
}

@ -1,4 +0,0 @@
{
"$ref": "event.json",
"room_id": "!jEsUZKDJdhlrceRyVU:example.org"
}

@ -1,10 +0,0 @@
{
"$ref": "event.json",
"event_id": "$143273582443PhrSn:example.org",
"room_id": "!jEsUZKDJdhlrceRyVU:example.org",
"sender": "@example:example.org",
"origin_server_ts": 1432735824653,
"unsigned": {
"age": 1234
}
}

@ -1,4 +0,0 @@
{
"$ref": "room_event.json",
"state_key": "ArbitraryString"
}

@ -1,18 +0,0 @@
[
{
"type": "m.room.name",
"sender": "@bob:example.org",
"state_key": "",
"content": {
"name": "Example Room"
}
},
{
"type": "m.room.join_rules",
"sender": "@bob:example.org",
"state_key": "",
"content": {
"join_rule": "invite"
}
}
]

@ -1,10 +0,0 @@
{
"$ref": "core/event.json",
"type": "m.accepted_terms",
"content": {
"accepted": [
"https://example.org/somewhere/terms-1.2-en.html",
"https://example.org/somewhere/privacy-1.2-en.html"
]
}
}

@ -1,13 +0,0 @@
{
"$ref": "core/room_event.json",
"type": "m.call.answer",
"content": {
"version" : 0,
"call_id": "12345",
"lifetime": 60000,
"answer": {
"type" : "answer",
"sdp" : "v=0\r\no=- 6584580628695956864 2 IN IP4 127.0.0.1[...]"
}
}
}

@ -1,15 +0,0 @@
{
"$ref": "core/room_event.json",
"type": "m.call.candidates",
"content": {
"version" : 0,
"call_id": "12345",
"candidates": [
{
"sdpMid": "audio",
"sdpMLineIndex": 0,
"candidate": "candidate:863018703 1 udp 2122260223 10.9.64.156 43670 typ host generation 0"
}
]
}
}

@ -1,8 +0,0 @@
{
"$ref": "core/room_event.json",
"type": "m.call.hangup",
"content": {
"version" : 0,
"call_id": "12345"
}
}

@ -1,13 +0,0 @@
{
"$ref": "core/room_event.json",
"type": "m.call.invite",
"content": {
"version" : 0,
"call_id": "12345",
"lifetime": 60000,
"offer": {
"type" : "offer",
"sdp" : "v=0\r\no=- 6584580628695956864 2 IN IP4 127.0.0.1[...]"
}
}
}

@ -1,10 +0,0 @@
{
"$ref": "core/event.json",
"type": "m.direct",
"content": {
"@bob:example.com": [
"!abcdefgh:example.com",
"!hgfedcba:example.com"
]
}
}

@ -1,4 +0,0 @@
{
"content": {},
"type": "m.dummy"
}

@ -1,14 +0,0 @@
{
"content": {
"algorithm": "m.megolm.v1.aes-sha2",
"room_id": "!Cuyf34gef24t:localhost",
"session_id": "X3lUlvLELLYxeTx4yOVu6UDpasGEVO0Jbu+QFnm0cKQ",
"session_key": "AgAAAADxKHa9uFxcXzwYoNueL5Xqi69IkD4sni8Llf...",
"sender_key": "RF3s+E7RkTQTGF2d8Deol0FkQvgII2aJDf3/Jp5mxVU",
"sender_claimed_ed25519_key": "aj40p+aw64yPIdsxoog8jhPu9i7l7NcFRecuOQblE3Y",
"forwarding_curve25519_key_chain": [
"hPQNcabIABgGnx3/ACv/jmMmiQHoeFfuLB17tzWp6Hw"
]
},
"type": "m.forwarded_room_key"
}

@ -1,8 +0,0 @@
{
"$ref": "core/event.json",
"type": "m.fully_read",
"room_id": "!somewhere:example.org",
"content": {
"event_id": "$someplace:example.org"
}
}

@ -1,7 +0,0 @@
{
"$ref": "core/event.json",
"type": "m.identity_server",
"content": {
"base_url": "https://example.org"
}
}

@ -1,9 +0,0 @@
{
"$ref": "core/event.json",
"type": "m.ignored_user_list",
"content": {
"ignored_users": {
"@someone:example.org": {}
}
}
}

@ -1,12 +0,0 @@
{
"type": "m.key.verification.accept",
"content": {
"transaction_id": "S0meUniqueAndOpaqueString",
"method": "m.sas.v1",
"key_agreement_protocol": "curve25519",
"hash": "sha256",
"message_authentication_code": "hkdf-hmac-sha256",
"short_authentication_string": ["decimal", "emoji"],
"commitment": "fQpGIW1Snz+pwLZu6sTy2aHy/DYWWTspTJRPyNp0PKkymfIsNffysMl6ObMMFdIJhk6g6pwlIqZ54rxo8SLmAg"
}
}

@ -1,8 +0,0 @@
{
"type": "m.key.verification.cancel",
"content": {
"transaction_id": "S0meUniqueAndOpaqueString",
"code": "m.user",
"reason": "User rejected the key verification request"
}
}

@ -1,7 +0,0 @@
{
"type": "m.key.verification.key",
"content": {
"transaction_id": "S0meUniqueAndOpaqueString",
"key": "fQpGIW1Snz+pwLZu6sTy2aHy/DYWWTspTJRPyNp0PKkymfIsNffysMl6ObMMFdIJhk6g6pwlIqZ54rxo8SLmAg"
}
}

@ -1,10 +0,0 @@
{
"type": "m.key.verification.mac",
"content": {
"transaction_id": "S0meUniqueAndOpaqueString",
"keys": "2Wptgo4CwmLo/Y8B8qinxApKaCkBG2fjTWB7AbP5Uy+aIbygsSdLOFzvdDjww8zUVKCmI02eP9xtyJxc/cLiBA",
"mac": {
"ed25519:ABCDEF": "fQpGIW1Snz+pwLZu6sTy2aHy/DYWWTspTJRPyNp0PKkymfIsNffysMl6ObMMFdIJhk6g6pwlIqZ54rxo8SLmAg"
}
}
}

@ -1,11 +0,0 @@
{
"type": "m.key.verification.request",
"content": {
"from_device": "AliceDevice2",
"transaction_id": "S0meUniqueAndOpaqueString",
"methods": [
"m.sas.v1"
],
"timestamp": 1559598944869
}
}

@ -1,8 +0,0 @@
{
"type": "m.key.verification.start",
"content": {
"from_device": "BobDevice1",
"transaction_id": "S0meUniqueAndOpaqueString",
"method": "m.sas.v1"
}
}

@ -1,12 +0,0 @@
{
"type": "m.key.verification.start",
"content": {
"from_device": "BobDevice1",
"transaction_id": "S0meUniqueAndOpaqueString",
"method": "m.sas.v1",
"key_agreement_protocols": ["curve25519"],
"hashes": ["sha256"],
"message_authentication_codes": ["hkdf-hmac-sha256"],
"short_authentication_string": ["decimal", "emoji"]
}
}

@ -1,10 +0,0 @@
{
"$ref": "core/state_event.json",
"type": "m.policy.rule.room",
"state_key": "rule:#*:example.org",
"content": {
"entity": "#*:example.org",
"recommendation": "m.ban",
"reason": "undesirable content"
}
}

@ -1,10 +0,0 @@
{
"$ref": "core/state_event.json",
"type": "m.policy.rule.server",
"state_key": "rule:*.example.org",
"content": {
"entity": "*.example.org",
"recommendation": "m.ban",
"reason": "undesirable engagement"
}
}

@ -1,10 +0,0 @@
{
"$ref": "core/state_event.json",
"type": "m.policy.rule.user",
"state_key": "rule:@alice*:example.org",
"content": {
"entity": "@alice*:example.org",
"recommendation": "m.ban",
"reason": "undesirable behaviour"
}
}

@ -1,12 +0,0 @@
{
"$ref": "core/event.json",
"sender": "@example:localhost",
"type": "m.presence",
"content": {
"avatar_url": "mxc://localhost:wefuiwegh8742w",
"last_active_ago": 2478593,
"presence": "online",
"currently_active": false,
"status_msg": "Making cupcakes"
}
}

@ -1,197 +0,0 @@
{
"$ref": "core/event.json",
"type": "m.push_rules",
"content": {
"global": {
"content": [
{
"actions": [
"notify",
{
"set_tweak": "sound",
"value": "default"
},
{
"set_tweak": "highlight"
}
],
"default": true,
"enabled": true,
"pattern": "alice",
"rule_id": ".m.rule.contains_user_name"
}
],
"override": [
{
"actions": [
"dont_notify"
],
"conditions": [],
"default": true,
"enabled": false,
"rule_id": ".m.rule.master"
},
{
"actions": [
"dont_notify"
],
"conditions": [
{
"key": "content.msgtype",
"kind": "event_match",
"pattern": "m.notice"
}
],
"default": true,
"enabled": true,
"rule_id": ".m.rule.suppress_notices"
}
],
"room": [],
"sender": [],
"underride": [
{
"actions": [
"notify",
{
"set_tweak": "sound",
"value": "ring"
},
{
"set_tweak": "highlight",
"value": false
}
],
"conditions": [
{
"key": "type",
"kind": "event_match",
"pattern": "m.call.invite"
}
],
"default": true,
"enabled": true,
"rule_id": ".m.rule.call"
},
{
"actions": [
"notify",
{
"set_tweak": "sound",
"value": "default"
},
{
"set_tweak": "highlight"
}
],
"conditions": [
{
"kind": "contains_display_name"
}
],
"default": true,
"enabled": true,
"rule_id": ".m.rule.contains_display_name"
},
{
"actions": [
"notify",
{
"set_tweak": "sound",
"value": "default"
},
{
"set_tweak": "highlight",
"value": false
}
],
"conditions": [
{
"kind": "room_member_count",
"is": "2"
},
{
"kind": "event_match",
"key": "type",
"pattern": "m.room.message"
}
],
"default": true,
"enabled": true,
"rule_id": ".m.rule.room_one_to_one"
},
{
"actions": [
"notify",
{
"set_tweak": "sound",
"value": "default"
},
{
"set_tweak": "highlight",
"value": false
}
],
"conditions": [
{
"key": "type",
"kind": "event_match",
"pattern": "m.room.member"
},
{
"key": "content.membership",
"kind": "event_match",
"pattern": "invite"
},
{
"key": "state_key",
"kind": "event_match",
"pattern": "@alice:example.com"
}
],
"default": true,
"enabled": true,
"rule_id": ".m.rule.invite_for_me"
},
{
"actions": [
"notify",
{
"set_tweak": "highlight",
"value": false
}
],
"conditions": [
{
"key": "type",
"kind": "event_match",
"pattern": "m.room.member"
}
],
"default": true,
"enabled": true,
"rule_id": ".m.rule.member_event"
},
{
"actions": [
"notify",
{
"set_tweak": "highlight",
"value": false
}
],
"conditions": [
{
"key": "type",
"kind": "event_match",
"pattern": "m.room.message"
}
],
"default": true,
"enabled": true,
"rule_id": ".m.rule.message"
}
]
}
}
}

@ -1,13 +0,0 @@
{
"$ref": "core/room_edu.json",
"type": "m.receipt",
"content": {
"$1435641916114394fHBLK:matrix.org": {
"m.read": {
"@rikj:jki.re": {
"ts": 1436451550453
}
}
}
}
}

@ -1,14 +0,0 @@
{
"$ref": "core/state_event.json",
"type": "m.room.avatar",
"state_key": "",
"content": {
"info": {
"h": 398,
"w": 394,
"mimetype": "image/jpeg",
"size": 31037
},
"url": "mxc://example.org/JWEIFJgwEIhweiWJE"
}
}

@ -1,12 +0,0 @@
{
"$ref": "core/state_event.json",
"type": "m.room.canonical_alias",
"state_key": "",
"content": {
"alias": "#somewhere:localhost",
"alt_aliases": [
"#somewhere:example.org",
"#myroom:example.com"
]
}
}

@ -1,14 +0,0 @@
{
"$ref": "core/state_event.json",
"type": "m.room.create",
"state_key": "",
"content": {
"creator": "@example:example.org",
"room_version": "1",
"m.federate": true,
"predecessor": {
"event_id": "$something:example.org",
"room_id": "!oldroom:example.org"
}
}
}

@ -1,11 +0,0 @@
{
"$ref": "core/room_event.json",
"type": "m.room.encrypted",
"content": {
"algorithm": "m.megolm.v1.aes-sha2",
"ciphertext": "AwgAEnACgAkLmt6qF84IK++J7UDH2Za1YVchHyprqTqsg...",
"device_id": "RJYKSTBOIE",
"sender_key": "IlRMeOPX2e0MurIyfWEucYBRVOEEUMrOHqn/8mLqMjA",
"session_id": "X3lUlvLELLYxeTx4yOVu6UDpasGEVO0Jbu+QFnm0cKQ"
}
}

@ -1,14 +0,0 @@
{
"$ref": "core/room_event.json",
"type": "m.room.encrypted",
"content": {
"algorithm": "m.olm.v1.curve25519-aes-sha2",
"sender_key": "Szl29ksW/L8yZGWAX+8dY1XyFi+i5wm+DRhTGkbMiwU",
"ciphertext": {
"7qZcfnBmbEGzxxaWfBjElJuvn7BZx+lSz/SvFrDF/z8": {
"type": 0,
"body": "AwogGJJzMhf/S3GQFXAOrCZ3iKyGU5ZScVtjI0KypTYrW..."
}
}
}
}

@ -1,10 +0,0 @@
{
"$ref": "core/state_event.json",
"type": "m.room.encryption",
"state_key": "",
"content": {
"algorithm": "m.megolm.v1.aes-sha2",
"rotation_period_ms": 604800000,
"rotation_period_msgs": 100
}
}

@ -1,8 +0,0 @@
{
"$ref": "core/state_event.json",
"type": "m.room.guest_access",
"state_key": "",
"content": {
"guest_access": "can_join"
}
}

@ -1,8 +0,0 @@
{
"$ref": "core/state_event.json",
"type": "m.room.history_visibility",
"state_key": "",
"content": {
"history_visibility": "shared"
}
}

@ -1,8 +0,0 @@
{
"$ref": "core/state_event.json",
"type": "m.room.join_rules",
"state_key": "",
"content": {
"join_rule": "public"
}
}

@ -1,11 +0,0 @@
{
"$ref": "core/state_event.json",
"state_key": "@alice:example.org",
"type": "m.room.member",
"content": {
"membership": "join",
"avatar_url": "mxc://example.org/SEsfnsuifSDFSSEF",
"displayname": "Alice Margatroid",
"reason": "Looking for support"
}
}

@ -1,15 +0,0 @@
{
"$ref": "m.room.member",
"content": {
"membership": "invite",
"avatar_url": "mxc://example.org/SEsfnsuifSDFSSEF",
"displayname": "Alice Margatroid",
"reason": "Looking for support"
},
"unsigned": {
"age": 1234,
"invite_room_state": {
"$ref": "invite_room_state.json"
}
}
}

@ -1,20 +0,0 @@
{
"$ref": "m.room.member",
"content": {
"membership": "invite",
"avatar_url": "mxc://example.org/SEsfnsuifSDFSSEF",
"displayname": "Alice Margatroid",
"third_party_invite": {
"display_name": "alice",
"signed": {
"mxid": "@alice:example.org",
"signatures": {
"magic.forest": {
"ed25519:3": "fQpGIW1Snz+pwLZu6sTy2aHy/DYWWTspTJRPyNp0PKkymfIsNffysMl6ObMMFdIJhk6g6pwlIqZ54rxo8SLmAg"
}
},
"token": "abc123"
}
}
}
}

@ -1,14 +0,0 @@
{
"$ref": "core/room_event.json",
"type": "m.room.message",
"content": {
"body": "Bee Gees - Stayin' Alive",
"url": "mxc://example.org/ffed755USFFxlgbQYZGtryd",
"info": {
"duration": 2140786,
"size": 1563685,
"mimetype": "audio/mpeg"
},
"msgtype": "m.audio"
}
}

@ -1,10 +0,0 @@
{
"$ref": "core/room_event.json",
"type": "m.room.message",
"content": {
"body": "thinks this is an example emote",
"msgtype": "m.emote",
"format": "org.matrix.custom.html",
"formatted_body": "thinks <b>this</b> is an example emote"
}
}

@ -1,14 +0,0 @@
{
"$ref": "core/room_event.json",
"type": "m.room.message",
"content": {
"body": "something-important.doc",
"filename": "something-important.doc",
"info": {
"mimetype": "application/msword",
"size": 46144
},
"msgtype": "m.file",
"url": "mxc://example.org/FHyPlCeYUSFFxlgbQYZmoEoe"
}
}

@ -1,15 +0,0 @@
{
"$ref": "core/room_event.json",
"type": "m.room.message",
"content": {
"body": "filename.jpg",
"info": {
"h": 398,
"w": 394,
"mimetype": "image/jpeg",
"size": 31037
},
"url": "mxc://example.org/JWEIFJgwEIhweiWJE",
"msgtype": "m.image"
}
}

@ -1,18 +0,0 @@
{
"$ref": "core/room_event.json",
"type": "m.room.message",
"content": {
"body": "Big Ben, London, UK",
"geo_uri": "geo:51.5008,0.1247",
"info": {
"thumbnail_url": "mxc://example.org/FHyPlCeYUSFFxlgbQYZmoEoe",
"thumbnail_info": {
"mimetype": "image/jpeg",
"size": 46144,
"w": 300,
"h": 300
}
},
"msgtype": "m.location"
}
}

@ -1,10 +0,0 @@
{
"$ref": "core/room_event.json",
"type": "m.room.message",
"content": {
"body": "This is an example notice",
"msgtype": "m.notice",
"format": "org.matrix.custom.html",
"formatted_body": "This is an <strong>example</strong> notice"
}
}

@ -1,11 +0,0 @@
{
"$ref": "core/room_event.json",
"type": "m.room.message",
"content": {
"body": "Human-readable message to explain the notice",
"msgtype": "m.server_notice",
"server_notice_type": "m.server_notice.usage_limit_reached",
"admin_contact": "mailto:server.admin@example.org",
"limit_type": "monthly_active_user"
}
}

@ -1,10 +0,0 @@
{
"$ref": "core/room_event.json",
"type": "m.room.message",
"content": {
"body": "This is an example text message",
"msgtype": "m.text",
"format": "org.matrix.custom.html",
"formatted_body": "<b>This is an example text message</b>"
}
}

@ -1,23 +0,0 @@
{
"$ref": "core/room_event.json",
"type": "m.room.message",
"content": {
"body": "Gangnam Style",
"url": "mxc://example.org/a526eYUSFFxlgbQYZmo442",
"info": {
"thumbnail_url": "mxc://example.org/FHyPlCeYUSFFxlgbQYZmoEoe",
"thumbnail_info": {
"mimetype": "image/jpeg",
"size": 46144,
"w": 300,
"h": 300
},
"w": 480,
"h": 320,
"duration": 2140786,
"size": 1563685,
"mimetype": "video/mp4"
},
"msgtype": "m.video"
}
}

@ -1,8 +0,0 @@
{
"$ref": "core/room_event.json",
"type": "m.room.message.feedback",
"content": {
"type": "delivered",
"target_event_id": "$WEIGFHFW:localhost"
}
}

@ -1,8 +0,0 @@
{
"$ref": "core/state_event.json",
"type": "m.room.name",
"state_key": "",
"content": {
"name": "The room name"
}
}

@ -1,8 +0,0 @@
{
"$ref": "core/state_event.json",
"type": "m.room.pinned_events",
"state_key": "",
"content": {
"pinned": ["$someevent:example.org"]
}
}

@ -1,24 +0,0 @@
{
"$ref": "core/state_event.json",
"type": "m.room.power_levels",
"state_key": "",
"content": {
"ban": 50,
"events": {
"m.room.name": 100,
"m.room.power_levels": 100
},
"events_default": 0,
"invite": 50,
"kick": 50,
"redact": 50,
"state_default": 50,
"users": {
"@example:localhost": 100
},
"users_default": 0,
"notifications": {
"room": 20
}
}
}

@ -1,8 +0,0 @@
{
"$ref": "core/room_event.json",
"type": "m.room.redaction",
"redacts": "$fukweghifu23:localhost",
"content": {
"reason": "Spamming"
}
}

@ -1,10 +0,0 @@
{
"$ref": "core/state_event.json",
"type": "m.room.server_acl",
"state_key": "",
"content": {
"allow_ip_literals": false,
"allow": ["*"],
"deny": ["*.evil.com", "evil.com"]
}
}

@ -1,14 +0,0 @@
{
"$ref": "core/state_event.json",
"type": "m.room.third_party_invite",
"state_key": "pc98",
"content": {
"display_name": "Alice Margatroid",
"key_validity_url": "https://magic.forest/verifykey",
"public_key": "abc123",
"public_keys": [{
"public_key": "def456",
"key_validity_url": "https://magic.forest/verifykey"
}]
}
}

@ -1,9 +0,0 @@
{
"$ref": "core/state_event.json",
"type": "m.room.tombstone",
"state_key": "",
"content": {
"body": "This room has been replaced",
"replacement_room": "!newroom:example.org"
}
}

@ -1,8 +0,0 @@
{
"$ref": "core/state_event.json",
"type": "m.room.topic",
"state_key": "",
"content": {
"topic": "A room topic"
}
}

@ -1,10 +0,0 @@
{
"$ref": "core/event.json",
"type": "m.room_key",
"content": {
"algorithm": "m.megolm.v1.aes-sha2",
"room_id": "!Cuyf34gef24t:localhost",
"session_id": "X3lUlvLELLYxeTx4yOVu6UDpasGEVO0Jbu+QFnm0cKQ",
"session_key": "AgAAAADxKHa9uFxcXzwYoNueL5Xqi69IkD4sni8LlfJL7qNBEY..."
}
}

@ -1,12 +0,0 @@
{
"$ref": "core/event.json",
"type": "m.room_key.withheld",
"content": {
"algorithm": "m.megolm.v1.aes-sha2",
"room_id": "!Cuyf34gef24t:localhost",
"session_id": "X3lUlvLELLYxeTx4yOVu6UDpasGEVO0Jbu+QFnm0cKQ",
"sender_key": "RF3s+E7RkTQTGF2d8Deol0FkQvgII2aJDf3/Jp5mxVU",
"code": "m.unverified",
"reason": "Device not verified"
}
}

@ -1,8 +0,0 @@
{
"content": {
"action": "request_cancellation",
"requesting_device_id": "RJYKSTBOIE",
"request_id": "1495474790150.19"
},
"type": "m.room_key_request"
}

@ -1,14 +0,0 @@
{
"content": {
"body": {
"algorithm": "m.megolm.v1.aes-sha2",
"room_id": "!Cuyf34gef24t:localhost",
"session_id": "X3lUlvLELLYxeTx4yOVu6UDpasGEVO0Jbu+QFnm0cKQ",
"sender_key": "RF3s+E7RkTQTGF2d8Deol0FkQvgII2aJDf3/Jp5mxVU"
},
"action": "request",
"requesting_device_id": "RJYKSTBOIE",
"request_id": "1495474790150.19"
},
"type": "m.room_key_request"
}

@ -1,21 +0,0 @@
{
"$ref": "core/room_event.json",
"type": "m.sticker",
"content": {
"body": "Landing",
"info": {
"mimetype": "image/png",
"thumbnail_info": {
"mimetype": "image/png",
"h": 200,
"w": 140,
"size": 73602
},
"h": 200,
"thumbnail_url": "mxc://matrix.org/sHhqkFCvSkFwtmvtETOtKnLP",
"w": 140,
"size": 73602
},
"url": "mxc://matrix.org/sHhqkFCvSkFwtmvtETOtKnLP"
}
}

@ -1,9 +0,0 @@
{
"$ref": "core/event.json",
"type": "m.tag",
"content": {
"tags": {
"u.work": {"order": 0.9}
}
}
}

@ -1,7 +0,0 @@
{
"$ref": "core/room_edu.json",
"type": "m.typing",
"content": {
"user_ids": ["@alice:matrix.org", "@bob:example.com"]
}
}

@ -1,30 +0,0 @@
# Copyright 2020 The Matrix.org Foundation C.I.C.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
properties:
entity:
description: |-
The entity affected by this rule. Glob characters ``*`` and ``?`` can be used
to match zero or more and one or more characters respectively.
type: string
recommendation:
description: The suggested action to take. Currently only ``m.ban`` is specified.
type: string
reason:
description: The human-readable description for the ``recommendation``.
type: string
type: object
required:
- entity
- recommendation
- reason

@ -1,15 +0,0 @@
description: The basic set of fields all events must have.
properties:
content:
description: The fields in this object will vary depending on the type of event.
When interacting with the REST API, this is the HTTP body.
type: object
type:
description: The type of event. This SHOULD be namespaced similar to Java package
naming conventions e.g. 'com.example.subdomain.event.type'
type: string
required:
- type
- content
title: Event
type: object

@ -1,36 +0,0 @@
$schema: http://json-schema.org/draft-04/schema#
description: Metadata about an image.
properties:
h:
description: |-
The intended display height of the image in pixels. This may
differ from the intrinsic dimensions of the image file.
type: integer
w:
description: |-
The intended display width of the image in pixels. This may
differ from the intrinsic dimensions of the image file.
type: integer
mimetype:
description: The mimetype of the image, e.g. ``image/jpeg``.
type: string
size:
description: Size of the image in bytes.
type: integer
thumbnail_url:
description: |-
The URL (typically `MXC URI`_) to a thumbnail of the image.
Only present if the thumbnail is unencrypted.
type: string
thumbnail_file:
description: |-
Information on the encrypted thumbnail file, as specified in
|encrypted_files|_. Only present if the thumbnail is encrypted.
title: EncryptedFile
type: object
thumbnail_info:
allOf:
- $ref: thumbnail_info.yaml
description: Metadata about the image referred to in ``thumbnail_url``.
title: ImageInfo
type: object

@ -1,21 +0,0 @@
$schema: http://json-schema.org/draft-04/schema#
description: Metadata about a thumbnail image.
properties:
h:
description: |-
The intended display height of the image in pixels. This may
differ from the intrinsic dimensions of the image file.
type: integer
w:
description: |-
The intended display width of the image in pixels. This may
differ from the intrinsic dimensions of the image file.
type: integer
mimetype:
description: The mimetype of the image, e.g. ``image/jpeg``.
type: string
size:
description: Size of the image in bytes.
type: integer
title: ThumbnailInfo
type: object

@ -1,13 +0,0 @@
allOf:
- $ref: sync_room_event.yaml
description: Room Events have the following fields.
properties:
room_id:
description: |-
The ID of the room associated with this event. Will not be present on events
that arrive through ``/sync``, despite being required everywhere else.
type: string
required:
- room_id
title: RoomEvent
type: object

@ -1,6 +0,0 @@
allOf:
- $ref: room_event.yaml
- $ref: sync_state_event.yaml
description: State Events have the following fields.
title: StateEvent
type: object

@ -1,43 +0,0 @@
# Copyright 2018 New Vector Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Note: this is technically not a core event schema, however it is included here
# to keep things sane. The short story is that /sync doesn't require a room_id to
# be on events, so we give it a whole event structure as a base for room_event.
# This base doesn't declare a room_id, which instead appears in the room_event.
allOf:
- $ref: event.yaml
description: In addition to the Event fields, Room Events have the following additional
fields.
properties:
event_id:
description: The globally unique event identifier.
type: string
sender:
description: Contains the fully-qualified ID of the user who sent this event.
type: string
origin_server_ts:
description: Timestamp in milliseconds on originating homeserver
when this event was sent.
type: integer
format: int64
unsigned:
$ref: unsigned_prop.yaml
required:
- event_id
- sender
- origin_server_ts
title: SyncRoomEvent
type: object

@ -1,39 +0,0 @@
# Copyright 2018 New Vector Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# See sync_room_event.yaml for why this file is here.
allOf:
- $ref: sync_room_event.yaml
description: In addition to the Room Event fields, State Events have the following
additional fields.
properties:
prev_content:
description: Optional. The previous ``content`` for this event. If there is no
previous content, this key will be missing.
title: EventContent
type: object
state_key:
description: A unique key which defines the overwriting semantics for this piece
of room state. This value is often a zero-length string. The presence of this
key makes this event a State Event.
State keys starting with an ``@`` are reserved for referencing user IDs, such
as room members. With the exception of a few events, state events set with a
given user's ID as the state key MUST only be set by that user.
type: string
required:
- state_key
title: SyncStateEvent
type: object

@ -1,34 +0,0 @@
# Copyright 2020 The Matrix.org Foundation C.I.C.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
title: UnsignedData
type: object
description: Contains optional extra information about the event.
properties:
age:
description: The time in milliseconds that has elapsed since the event was
sent. This field is generated by the local homeserver, and may be incorrect
if the local time on at least one of the two servers is out of sync, which can
cause the age to either be negative or greater than it actually is.
type: integer
redacted_because:
description: The event that redacted this event, if any.
title: Event
type: object
transaction_id:
description: |
The client-supplied transaction ID, for example, provided via
``PUT /_matrix/client/r0/rooms/{roomId}/send/{eventType}/{txnId}``,
if the client being given the event is the same one which sent it.
type: string

@ -1,23 +0,0 @@
---
allOf:
- $ref: core-event-schema/event.yaml
description: |-
A list of terms URLs the user has previously accepted. Clients SHOULD use this
to avoid presenting the user with terms they have already agreed to.
properties:
content:
type: object
properties:
accepted:
type: array
items:
type: string
description: |-
The list of URLs the user has previously accepted. Should be appended to
when the user agrees to new terms.
type:
enum:
- m.accepted_terms
type: string
title: Accepted Terms of Service URLs
type: object

@ -1,44 +0,0 @@
{
"type": "object",
"description": "This event is sent by the callee when they wish to answer the call.",
"allOf": [{
"$ref": "core-event-schema/room_event.yaml"
}],
"properties": {
"content": {
"type": "object",
"properties": {
"call_id": {
"type": "string",
"description": "The ID of the call this event relates to."
},
"answer": {
"type": "object",
"title": "Answer",
"description": "The session description object",
"properties": {
"type": {
"type": "string",
"enum": ["answer"],
"description": "The type of session description."
},
"sdp": {
"type": "string",
"description": "The SDP text of the session description."
}
},
"required": ["type", "sdp"]
},
"version": {
"type": "number",
"description": ""
}
},
"required": ["call_id", "answer", "version"]
},
"type": {
"type": "string",
"enum": ["m.call.answer"]
}
}
}

@ -1,50 +0,0 @@
{
"type": "object",
"description": "This event is sent by callers after sending an invite and by the callee after answering. Its purpose is to give the other party additional ICE candidates to try using to communicate.",
"allOf": [{
"$ref": "core-event-schema/room_event.yaml"
}],
"properties": {
"content": {
"type": "object",
"properties": {
"call_id": {
"type": "string",
"description": "The ID of the call this event relates to."
},
"candidates": {
"type": "array",
"description": "Array of objects describing the candidates.",
"items": {
"type": "object",
"title": "Candidate",
"properties": {
"sdpMid": {
"type": "string",
"description": "The SDP media type this candidate is intended for."
},
"sdpMLineIndex": {
"type": "number",
"description": "The index of the SDP 'm' line this candidate is intended for."
},
"candidate": {
"type": "string",
"description": "The SDP 'a' line of the candidate."
}
},
"required": ["candidate", "sdpMLineIndex", "sdpMid"]
}
},
"version": {
"type": "integer",
"description": "The version of the VoIP specification this messages adheres to. This specification is version 0."
}
},
"required": ["call_id", "candidates", "version"]
},
"type": {
"type": "string",
"enum": ["m.call.candidates"]
}
}
}

@ -1,35 +0,0 @@
{
"type": "object",
"description": "Sent by either party to signal their termination of the call. This can be sent either once the call has has been established or before to abort the call.",
"allOf": [{
"$ref": "core-event-schema/room_event.yaml"
}],
"properties": {
"content": {
"type": "object",
"properties": {
"call_id": {
"type": "string",
"description": "The ID of the call this event relates to."
},
"version": {
"type": "integer",
"description": "The version of the VoIP specification this message adheres to. This specification is version 0."
},
"reason": {
"type": "string",
"description": "Optional error reason for the hangup. This should not be provided when the user naturally ends or rejects the call. When there was an error in the call negotiation, this should be ``ice_failed`` for when ICE negotiation fails or ``invite_timeout`` for when the other party did not answer in time.",
"enum": [
"ice_failed",
"invite_timeout"
]
}
},
"required": ["call_id", "version"]
},
"type": {
"type": "string",
"enum": ["m.call.hangup"]
}
}
}

@ -1,48 +0,0 @@
{
"type": "object",
"description": "This event is sent by the caller when they wish to establish a call.",
"allOf": [{
"$ref": "core-event-schema/room_event.yaml"
}],
"properties": {
"content": {
"type": "object",
"properties": {
"call_id": {
"type": "string",
"description": "A unique identifier for the call."
},
"offer": {
"type": "object",
"title": "Offer",
"description": "The session description object",
"properties": {
"type": {
"type": "string",
"enum": ["offer"],
"description": "The type of session description."
},
"sdp": {
"type": "string",
"description": "The SDP text of the session description."
}
},
"required": ["type", "sdp"]
},
"version": {
"type": "integer",
"description": "The version of the VoIP specification this message adheres to. This specification is version 0."
},
"lifetime": {
"type": "integer",
"description": "The time in milliseconds that the invite is valid for. Once the invite age exceeds this value, clients should discard it. They should also no longer show the call as awaiting an answer in the UI."
}
},
"required": ["call_id", "offer", "version", "lifetime"]
},
"type": {
"type": "string",
"enum": ["m.call.invite"]
}
}
}

@ -1,23 +0,0 @@
---
allOf:
- $ref: core-event-schema/event.yaml
description: |-
A map of which rooms are considered 'direct' rooms for specific users
is kept in ``account_data`` in an event of type ``m.direct``. The
content of this event is an object where the keys are the user IDs
and values are lists of room ID strings of the 'direct' rooms for
that user ID.
properties:
content:
additionalProperties:
type: array
title: User ID
items:
type: string
type: object
type:
enum:
- m.direct
type: string
title: Direct Chat Mapping
type: object

@ -1,23 +0,0 @@
---
allOf:
- $ref: core-event-schema/event.yaml
description: |-
This event type is used to indicate new Olm sessions for end-to-end encryption.
Typically it is encrypted as an ``m.room.encrypted`` event, then sent as a `to-device`_
event.
The event does not have any content associated with it. The sending client is expected
to send a key share request shortly after this message, causing the receiving client to
process this ``m.dummy`` event as the most recent event and using the keyshare request
to set up the session. The keyshare request and ``m.dummy`` combination should result
in the original sending client receiving keys over the newly established session.
properties:
content:
properties: {}
type: object
type:
enum:
- m.dummy
type: string
type: object

@ -1,68 +0,0 @@
---
allOf:
- $ref: core-event-schema/event.yaml
description: |-
This event type is used to forward keys for end-to-end encryption. Typically
it is encrypted as an ``m.room.encrypted`` event, then sent as a `to-device`_
event.
properties:
content:
properties:
algorithm:
type: string
description: |-
The encryption algorithm the key in this event is to be used with.
room_id:
type: string
description: The room where the key is used.
sender_key:
type: string
description: |-
The Curve25519 key of the device which initiated the session originally.
session_id:
type: string
description: The ID of the session that the key is for.
session_key:
type: string
description: The key to be exchanged.
sender_claimed_ed25519_key:
type: string
description: |-
The Ed25519 key of the device which initiated the session originally.
It is 'claimed' because the receiving device has no way to tell that the
original room_key actually came from a device which owns the private part of
this key unless they have done device verification.
forwarding_curve25519_key_chain:
type: array
items:
type: string
description: |-
Chain of Curve25519 keys. It starts out empty, but each time the
key is forwarded to another device, the previous sender in the chain is added
to the end of the list. For example, if the key is forwarded from A to B to
C, this field is empty between A and B, and contains A's Curve25519 key between
B and C.
withheld:
type: object
description: |-
Indicates that the key cannot be used to decrypt all the messages
from the session because a portion of the session was withheld as
described in `Reporting that decryption keys are withheld`_. This
object must include the ``code`` and ``reason`` properties from the
``m.room_key.withheld`` message that was received by the sender of
this message.
required:
- algorithm
- room_id
- session_id
- session_key
- sender_claimed_ed25519_key
- forwarding_curve25519_key_chain
- sender_key
type: object
type:
enum:
- m.forwarded_room_key
type: string
type: object

@ -1,29 +0,0 @@
{
"type": "object",
"title": "Read Marker Location Event",
"description": "The current location of the user's read marker in a room. This event appears in the user's room account data for the room the marker is applicable for.",
"allOf": [{
"$ref": "core-event-schema/event.yaml"
}],
"properties": {
"content": {
"type": "object",
"properties": {
"event_id": {
"type": "string",
"description": "The event the user's read marker is located at in the room."
}
},
"required": ["event_id"]
},
"type": {
"type": "string",
"enum": ["m.fully_read"]
},
"room_id": {
"type": "string",
"description": "The room ID the read marker applies to."
}
},
"required": ["type", "room_id", "content"]
}

@ -1,23 +0,0 @@
---
allOf:
- $ref: core-event-schema/event.yaml
description: |-
Persists the user's preferred identity server, or preference to not use
an identity server at all, in the user's account data.
properties:
content:
type: object
properties:
base_url:
type: string
description: |-
The URL of the identity server the user prefers to use, or ``null``
if the user does not want to use an identity server. This value is
similar in structure to the ``base_url`` for identity servers in the
``.well-known/matrix/client`` schema.
type:
enum:
- m.identity_server
type: string
title: Identity Server Preference
type: object

@ -1,28 +0,0 @@
---
allOf:
- $ref: core-event-schema/event.yaml
description: |-
A map of users which are considered ignored is kept in ``account_data``
in an event type of ``m.ignored_user_list``.
properties:
content:
type: object
properties:
ignored_users:
type: object
title: "Ignored users"
description: "The map of users to ignore"
patternProperties:
"^@":
type: "object"
title: "Ignored User"
description: "An empty object for future enhancement"
x-pattern: "$USER_ID"
required:
- ignored_users
type:
enum:
- m.ignored_user_list
type: string
title: Ignored User List
type: object

@ -1,59 +0,0 @@
---
allOf:
- $ref: core-event-schema/event.yaml
description: |-
Accepts a previously sent ``m.key.verification.start`` message. Typically sent as a
`to-device`_ event.
properties:
content:
properties:
transaction_id:
type: string
description: |-
An opaque identifier for the verification process. Must be the same as
the one used for the ``m.key.verification.start`` message.
key_agreement_protocol:
type: string
description: |-
The key agreement protocol the device is choosing to use, out of the
options in the ``m.key.verification.start`` message.
hash:
type: string
description: |-
The hash method the device is choosing to use, out of the options in
the ``m.key.verification.start`` message.
message_authentication_code:
type: string
description: |-
The message authentication code the device is choosing to use, out of
the options in the ``m.key.verification.start`` message.
short_authentication_string:
type: array
description: |-
The SAS methods both devices involved in the verification process
understand. Must be a subset of the options in the ``m.key.verification.start``
message.
items:
type: string
enum: ["decimal", "emoji"]
commitment:
type: string
description: |-
The hash (encoded as unpadded base64) of the concatenation of the device's
ephemeral public key (encoded as unpadded base64) and the canonical JSON
representation of the ``m.key.verification.start`` message.
required:
- transaction_id
- method
- key_agreement_protocol
- hash
- message_authentication_code
- short_authentication_string
- commitment
type: object
type:
enum:
- m.key.verification.accept
type: string
type: object

@ -1,70 +0,0 @@
---
allOf:
- $ref: core-event-schema/event.yaml
description: |-
Cancels a key verification process/request. Typically sent as a `to-device`_ event.
properties:
content:
properties:
transaction_id:
type: string
description: |-
The opaque identifier for the verification process/request.
reason:
type: string
description: |-
A human readable description of the ``code``. The client should only rely on this
string if it does not understand the ``code``.
code:
type: string
# Note: this is not an enum because we go into detail about the different
# error codes. If we made this an enum, we'd be repeating information.
# Also, we can't put a real bulleted list in here because the HTML2RST parser
# cuts the text at weird points, breaking the list completely.
description: |-
The error code for why the process/request was cancelled by the user. Error
codes should use the Java package naming convention if not in the following
list:
``m.user``: The user cancelled the verification.
``m.timeout``: The verification process timed out. Verification processes
can define their own timeout parameters.
``m.unknown_transaction``: The device does not know about the given transaction
ID.
``m.unknown_method``: The device does not know how to handle the requested
method. This should be sent for ``m.key.verification.start`` messages and
messages defined by individual verification processes.
``m.unexpected_message``: The device received an unexpected message. Typically
raised when one of the parties is handling the verification out of order.
``m.key_mismatch``: The key was not verified.
``m.user_mismatch``: The expected user did not match the user verified.
``m.invalid_message``: The message received was invalid.
``m.accepted``: A ``m.key.verification.request`` was accepted by a different
device. The device receiving this error can ignore the verification request.
Clients should be careful to avoid error loops. For example, if a device sends
an incorrect message and the client returns ``m.invalid_message`` to which it
gets an unexpected response with ``m.unexpected_message``, the client should not
respond again with ``m.unexpected_message`` to avoid the other device potentially
sending another error response.
.. The above blank line is important for RST.
required:
- transaction_id
- code
- reason
type: object
type:
enum:
- m.key.verification.cancel
type: string
type: object

@ -1,28 +0,0 @@
---
allOf:
- $ref: core-event-schema/event.yaml
description: |-
Sends the ephemeral public key for a device to the partner device. Typically sent as a
`to-device`_ event.
properties:
content:
properties:
transaction_id:
type: string
description: |-
An opaque identifier for the verification process. Must be the same as
the one used for the ``m.key.verification.start`` message.
key:
type: string
description: |-
The device's ephemeral public key, encoded as unpadded base64.
required:
- transaction_id
- key
type: object
type:
enum:
- m.key.verification.key
type: string
type: object

@ -1,38 +0,0 @@
---
allOf:
- $ref: core-event-schema/event.yaml
description: |-
Sends the MAC of a device's key to the partner device. Typically sent as a
`to-device`_ event.
properties:
content:
properties:
transaction_id:
type: string
description: |-
An opaque identifier for the verification process. Must be the same as
the one used for the ``m.key.verification.start`` message.
mac:
type: object
description: |-
A map of the key ID to the MAC of the key, using the algorithm in the
verification process. The MAC is encoded as unpadded base64.
additionalProperties:
type: string
description: The key's MAC, encoded as unpadded base64.
keys:
type: string
description: |-
The MAC of the comma-separated, sorted, list of key IDs given in the ``mac``
property, encoded as unpadded base64.
required:
- transaction_id
- mac
- keys
type: object
type:
enum:
- m.key.verification.mac
type: string
type: object

@ -1,43 +0,0 @@
---
allOf:
- $ref: core-event-schema/event.yaml
description: |-
Requests a key verification with another user's devices. Typically sent as a
`to-device`_ event.
properties:
content:
properties:
from_device:
type: string
description: |-
The device ID which is initiating the request.
transaction_id:
type: string
description: |-
An opaque identifier for the verification request. Must be unique
with respect to the devices involved.
methods:
type: array
description: |-
The verification methods supported by the sender.
items:
type: string
timestamp:
type: integer
format: int64
description: |-
The POSIX timestamp in milliseconds for when the request was made. If
the request is in the future by more than 5 minutes or more than 10
minutes in the past, the message should be ignored by the receiver.
required:
- from_device
- transaction_id
- methods
- timestamp
type: object
type:
enum:
- m.key.verification.request
type: string
type: object

@ -1,42 +0,0 @@
---
allOf:
- $ref: core-event-schema/event.yaml
description: |-
Begins a key verification process. Typically sent as a `to-device`_ event. The ``method``
field determines the type of verification. The fields in the event will differ depending
on the ``method``. This definition includes fields that are in common among all variants.
properties:
content:
properties:
from_device:
type: string
description: |-
The device ID which is initiating the process.
transaction_id:
type: string
description: |-
An opaque identifier for the verification process. Must be unique
with respect to the devices involved. Must be the same as the
``transaction_id`` given in the ``m.key.verification.request``
if this process is originating from a request.
method:
type: string
description: |-
The verification method to use.
next_method:
type: string
description: |-
Optional method to use to verify the other user's key with. Applicable
when the ``method`` chosen only verifies one user's key. This field will
never be present if the ``method`` verifies keys both ways.
required:
- from_device
- transaction_id
- method
type: object
type:
enum:
- m.key.verification.start
type: string
type: object

@ -1,69 +0,0 @@
---
allOf:
- $ref: core-event-schema/event.yaml
description: |-
Begins a SAS key verification process using the ``m.sas.v1`` method. Typically sent as a `to-device`_ event.
properties:
content:
properties:
from_device:
type: string
description: |-
The device ID which is initiating the process.
transaction_id:
type: string
description: |-
An opaque identifier for the verification process. Must be unique
with respect to the devices involved. Must be the same as the
``transaction_id`` given in the ``m.key.verification.request``
if this process is originating from a request.
method:
type: string
enum: ["m.sas.v1"]
description: |-
The verification method to use.
key_agreement_protocols:
type: array
description: |-
The key agreement protocols the sending device understands. Should
include at least ``curve25519-hkdf-sha256``.
items:
type: string
hashes:
type: array
description: |-
The hash methods the sending device understands. Must include at least
``sha256``.
items:
type: string
message_authentication_codes:
type: array
description: |-
The message authentication codes that the sending device understands.
Must include at least ``hkdf-hmac-sha256``.
items:
type: string
short_authentication_string:
type: array
description: |-
The SAS methods the sending device (and the sending device's user)
understands. Must include at least ``decimal``. Optionally can include
``emoji``.
items:
type: string
enum: ["decimal", "emoji"]
required:
- from_device
- transaction_id
- method
- key_agreement_protocols
- hashes
- message_authentication_codes
- short_authentication_string
type: object
type:
enum:
- m.key.verification.start
type: string
type: object

@ -1,15 +0,0 @@
---
allOf:
- $ref: core-event-schema/state_event.yaml
description: A moderation policy rule which affects room IDs and room aliases.
properties:
content:
$ref: "../moderation_policy_rule.yaml"
state_key:
description: An arbitrary string decided upon by the sender.
type: string
type:
enum:
- m.policy.rule.room
type: string
type: object

@ -1,15 +0,0 @@
---
allOf:
- $ref: core-event-schema/state_event.yaml
description: A moderation policy rule which affects servers.
properties:
content:
$ref: "../moderation_policy_rule.yaml"
state_key:
description: An arbitrary string decided upon by the sender.
type: string
type:
enum:
- m.policy.rule.server
type: string
type: object

@ -1,15 +0,0 @@
---
allOf:
- $ref: core-event-schema/state_event.yaml
description: A moderation policy rule which affects users.
properties:
content:
$ref: "../moderation_policy_rule.yaml"
state_key:
description: An arbitrary string decided upon by the sender.
type: string
type:
enum:
- m.policy.rule.user
type: string
type: object

@ -1,49 +0,0 @@
{
"type": "object",
"title": "Presence Event",
"description": "Informs the client of a user's presence state change.",
"allOf": [{
"$ref": "core-event-schema/event.yaml"
}],
"properties": {
"content": {
"type": "object",
"properties": {
"avatar_url": {
"type": "string",
"description": "The current avatar URL for this user, if any."
},
"displayname": {
"type": "string",
"description": "The current display name for this user, if any."
},
"last_active_ago": {
"type": "number",
"description": "The last time since this used performed some action, in milliseconds."
},
"presence": {
"type": "string",
"description": "The presence state for this user.",
"enum": ["online", "offline", "unavailable"]
},
"currently_active": {
"type": boolean,
"description": "Whether the user is currently active"
},
"status_msg": {
"type": "string",
"description": "An optional description to accompany the presence."
}
},
"required": ["presence"]
},
"type": {
"type": "string",
"enum": ["m.presence"]
},
"sender": {
"type": "string"
}
},
"required": ["sender", "type", "content"]
}

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save