mirror of
https://github.com/matrix-org/matrix-spec
synced 2026-01-08 17:03:42 +01:00
Merge pull request #29 from matrix-org/erikj/canonical_alias
Document the canonical alias event
This commit is contained in:
commit
99a4c198f4
12
event-schemas/examples/v1/m.room.canonical_alias
Normal file
12
event-schemas/examples/v1/m.room.canonical_alias
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"age": 242352,
|
||||
"content": {
|
||||
"alias": "#somewhere:localhost"
|
||||
},
|
||||
"state_key": "",
|
||||
"origin_server_ts": 1431961217939,
|
||||
"event_id": "$WLGTSEFSEF:localhost",
|
||||
"type": "m.room.canonical_alias",
|
||||
"room_id": "!Cuyf34gef24t:localhost",
|
||||
"user_id": "@example:localhost"
|
||||
}
|
||||
30
event-schemas/schema/v1/m.room.canonical_alias
Normal file
30
event-schemas/schema/v1/m.room.canonical_alias
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
{
|
||||
"$schema": "http://json-schema.org/draft-04/schema#",
|
||||
"type": "object",
|
||||
"title": "Informs the room as to which alias is the canonical one.",
|
||||
"description": "This event is used to inform the room about which alias should be considered the canonical one. This could be for display purposes or as suggestion to users which alias to use to advertise the room.",
|
||||
"allOf": [{
|
||||
"$ref": "core#/definitions/state_event"
|
||||
}],
|
||||
"properties": {
|
||||
"content": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"alias": {
|
||||
"type": "string",
|
||||
"description": "The canonical alias."
|
||||
}
|
||||
},
|
||||
"required": ["alias"]
|
||||
},
|
||||
"state_key": {
|
||||
"type": "string",
|
||||
"description": "A zero-length string.",
|
||||
"pattern": "^$"
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": ["m.room.canonical_alias"]
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue