Add redaction, feedback and presence events.
This commit is contained in:
parent
c78088cfd1
commit
6f842da227
7 changed files with 120 additions and 1 deletions
10
event-schemas/examples/m.presence
Normal file
10
event-schemas/examples/m.presence
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
{
|
||||||
|
"content": {
|
||||||
|
"avatar_url": "mxc://localhost:wefuiwegh8742w",
|
||||||
|
"last_active_ago": 2478593,
|
||||||
|
"presence": "online",
|
||||||
|
"user_id": "@example:localhost"
|
||||||
|
},
|
||||||
|
"event_id": "$WLGTSEFSEF:localhost",
|
||||||
|
"type": "m.presence"
|
||||||
|
}
|
12
event-schemas/examples/m.room.message.feedback
Normal file
12
event-schemas/examples/m.room.message.feedback
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
{
|
||||||
|
"age": 242352,
|
||||||
|
"content": {
|
||||||
|
"type": "delivered",
|
||||||
|
"target_event_id": "$WEIGFHFW:localhost"
|
||||||
|
},
|
||||||
|
"origin_server_ts": 1431961217939,
|
||||||
|
"event_id": "$WLGTSEFSEF:localhost",
|
||||||
|
"type": "m.room.message.feedback",
|
||||||
|
"room_id": "!Cuyf34gef24t:localhost",
|
||||||
|
"user_id": "@example:localhost"
|
||||||
|
}
|
10
event-schemas/examples/m.room.redaction
Normal file
10
event-schemas/examples/m.room.redaction
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
{
|
||||||
|
"age": 242352,
|
||||||
|
"content": {},
|
||||||
|
"origin_server_ts": 1431961217939,
|
||||||
|
"event_id": "$WLGTSEFSEF:localhost",
|
||||||
|
"type": "m.room.redaction",
|
||||||
|
"room_id": "!Cuyf34gef24t:localhost",
|
||||||
|
"redacts": "!fukweghifu23:localhost",
|
||||||
|
"user_id": "@example:localhost"
|
||||||
|
}
|
36
event-schemas/schema/m.presence
Normal file
36
event-schemas/schema/m.presence
Normal file
|
@ -0,0 +1,36 @@
|
||||||
|
{
|
||||||
|
"$schema": "http://json-schema.org/draft-04/schema#",
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"content": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"avatar_url": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"displayname": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"last_active_ago": {
|
||||||
|
"type": "number"
|
||||||
|
},
|
||||||
|
"presence": {
|
||||||
|
"type": "string",
|
||||||
|
"enum": ["online", "offline", "unavailable", "free_for_chat", "hidden"]
|
||||||
|
},
|
||||||
|
"user_id": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": ["presence", "user_id"]
|
||||||
|
},
|
||||||
|
"type": {
|
||||||
|
"type": "string",
|
||||||
|
"enum": ["m.presence"]
|
||||||
|
},
|
||||||
|
"event_id": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": ["event_id", "type", "content"]
|
||||||
|
}
|
|
@ -10,7 +10,7 @@
|
||||||
"properties": {
|
"properties": {
|
||||||
"membership": {
|
"membership": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"enum": ["invite","join","leave","ban"]
|
"enum": ["invite","join","knock","leave","ban"]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"required": ["membership"]
|
"required": ["membership"]
|
||||||
|
|
26
event-schemas/schema/m.room.message.feedback
Normal file
26
event-schemas/schema/m.room.message.feedback
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
{
|
||||||
|
"$schema": "http://json-schema.org/draft-04/schema#",
|
||||||
|
"type": "object",
|
||||||
|
"allOf": [{
|
||||||
|
"$ref": "core#/definitions/room_event"
|
||||||
|
}],
|
||||||
|
"properties": {
|
||||||
|
"content": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"type": {
|
||||||
|
"type": "string",
|
||||||
|
"enum": ["delivered", "read"]
|
||||||
|
},
|
||||||
|
"target_event_id": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": ["type", "target_event_id"]
|
||||||
|
},
|
||||||
|
"type": {
|
||||||
|
"type": "string",
|
||||||
|
"enum": ["m.room.message.feedback"]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
25
event-schemas/schema/m.room.redaction
Normal file
25
event-schemas/schema/m.room.redaction
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
{
|
||||||
|
"$schema": "http://json-schema.org/draft-04/schema#",
|
||||||
|
"type": "object",
|
||||||
|
"allOf": [{
|
||||||
|
"$ref": "core#/definitions/room_event"
|
||||||
|
}],
|
||||||
|
"properties": {
|
||||||
|
"content": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"reason": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"redacts": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"type": {
|
||||||
|
"type": "string",
|
||||||
|
"enum": ["m.room.redaction"]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": ["redacts"]
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue