Fix showing polls and update the events and PollHandler to make them easier to work with. Add a PollAnswerModel to visualise poll answers. Enable sending polls.
39 lines
1.1 KiB
JSON
39 lines
1.1 KiB
JSON
{
|
|
"timeline": {
|
|
"events": [
|
|
{
|
|
"content": {
|
|
"org.matrix.msc1767.text": "test\n1. option1\n2. option 2",
|
|
"org.matrix.msc3381.poll.start": {
|
|
"answers": [
|
|
{
|
|
"id": "option1",
|
|
"org.matrix.msc1767.text": "option1text"
|
|
},
|
|
{
|
|
"id": "option2",
|
|
"org.matrix.msc1767.text": "option2text"
|
|
}
|
|
],
|
|
"kind": "org.matrix.msc3381.poll.undisclosed",
|
|
"max_selections": 1,
|
|
"question": {
|
|
"body": "test",
|
|
"msgtype": "m.text",
|
|
"org.matrix.msc1767.text": "test"
|
|
}
|
|
}
|
|
},
|
|
"event_id": "$153456789:example.org",
|
|
"origin_server_ts": 1432735824654,
|
|
"room_id": "!jEsUZKDJdhlrceRyVU:example.org",
|
|
"sender": "@example:example.org",
|
|
"type": "org.matrix.msc3381.poll.start",
|
|
"unsigned": {
|
|
"age": 1232
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|