Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spec a format for calendar events in rooms. #1116

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions changelogs/client_server.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ Unreleased changes
- Add 'token' parameter to /keys/query endpoint
(`#1104 <https://github.com/matrix-org/matrix-doc/pull/1104>`_).

- New Event Types:

- ``m.room.calendar.event``
(`#1116 <https://github.com/matrix-org/matrix-doc/pull/1116>`_).

r0.3.0
======

Expand Down
32 changes: 32 additions & 0 deletions event-schemas/examples/m.room.calendar.event
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"age": 242352,
"content": {
"title": "Party at Bob's House",
"start_time": 922838400000,
"end_time": 922924800000,
"location_description": "123 Fake Street",
"location": {
"geometry": {
"type": "Point",
"coordinates": [125.6, 10.1]
}
},
"description": {
"body": "Party at Bob's house to celebrate the release of a sci-fi film. *Bring beer and popcorn*",
"formatted_body": "Party at Bob's house to celebrate the release of a sci-fi film. <i>Bring beer and popcorn</i>",
"format": "org.matrix.custom.html"
},
"thumbnail": {
"uri": "mxc://localhost/JWEIFJgwEIhweiWJE",
"width": 256,
"height": 256,
"mimetype": "image/jpeg",
"size": 1024000
}
},
"origin_server_ts": 1431961217939,
"event_id": "$WLGTSEFSEF:localhost",
"type": "m.room.calendar.event",
"room_id": "!Cuyf34gef24t:localhost",
"sender": "@bob:localhost"
}
68 changes: 68 additions & 0 deletions event-schemas/schema/m.room.calendar.event
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
---
$schema: http://json-schema.org/draft-04/schema#
allOf:
- $ref: core-event-schema/room_event.yaml
description: This event represents a single calendar event item. Clients may convert this into other formats such as iCal for users to put into third party calendars.
properties:
content:
properties:
title:
description: Descriptive short name for the event.
type: string
start_time:
description: When the event is due to start in milliseconds since epoch, UTC time.
type: integer
end_time:
description: When the event is due to end in milliseconds since epoch, UTC time.
type: integer
location_description:
description: A string representation of the location of the event.
type: string
location:
description: An object containing valid GeoJSON
type: object
description:
properties:
body:
description: Plaintext long description for the event.
type: string
formatted_body:
description: Formatted long description for the event.
type: string
format:
description: Format type of the formatted_body.
type: string
required:
- body
type: object
thumbnail:
properties:
uri:
description: The content URI to the thumbnail.
type: string
width:
description: Width of the thumbnail.
type: integer
height:
description: Height of the thumbnail.
type: integer
mimetype:
description: Mimetype of the thumbnail.
type: string
size:
description: Size in bytes of the thumbnail.
type: integer
required:
- uri
type: object
required:
- title
- start_time
- end_time
type: object
type:
enum:
- m.room.calendar.event
type: string
title: Calendar Event
type: object
6 changes: 6 additions & 0 deletions specification/events.rst
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,10 @@ prefixed with ``m.``

{{m_room_redaction_event}}

Room Calendar Events
--------------------

{{m_room_calendar_event_event}}


.. _`Canonical JSON`: ../appendices.html#canonical-json