Add example events.

These can be used for assertions as well as drop ins for the spec.
event-schemas
Kegan Dougal 9 years ago
parent c370599a17
commit a8af9bef29

@ -7,7 +7,7 @@ resolved correctly. For basic CLI testing, we recommend and have verified they
work with the Node.js package [z-schema](https://github.com/zaggino/z-schema):
```
$ npm install -g z-schema
$ z-schema m.room.message /path/to/json/file.json
$ z-schema m.room.message examples/m.room.message_m.text
schema validation passed
json #1 validation passed
```

@ -0,0 +1,12 @@
{
"age": 242352,
"content": {
"body": "thinks this is an example emote",
"msgtype": "m.emote"
},
"origin_server_ts": 1431961217939,
"event_id": "$WLGTSEFSEF:localhost",
"type": "m.room.message",
"room_id": "!Cuyf34gef24t:localhost",
"user_id": "@example:localhost"
}

@ -0,0 +1,19 @@
{
"age": 242352,
"content": {
"body": "filename.jpg",
"info": {
"h": 398,
"w": 394,
"mimetype": "image/jpeg",
"size": 31037
},
"url": "mxc://localhost/JWEIFJgwEIhweiWJE",
"msgtype": "m.image"
},
"origin_server_ts": 1431961217939,
"event_id": "$WLGTSEFSEF:localhost",
"type": "m.room.message",
"room_id": "!Cuyf34gef24t:localhost",
"user_id": "@example:localhost"
}

@ -0,0 +1,12 @@
{
"age": 242352,
"content": {
"body": "This is an example notice",
"msgtype": "m.notice"
},
"origin_server_ts": 1431961217939,
"event_id": "$WLGTSEFSEF:localhost",
"type": "m.room.message",
"room_id": "!Cuyf34gef24t:localhost",
"user_id": "@example:localhost"
}

@ -0,0 +1,12 @@
{
"age": 242352,
"content": {
"body": "This is an example text message",
"msgtype": "m.text"
},
"origin_server_ts": 1431961217939,
"event_id": "$WLGTSEFSEF:localhost",
"type": "m.room.message",
"room_id": "!Cuyf34gef24t:localhost",
"user_id": "@example:localhost"
}
Loading…
Cancel
Save