diff --git a/event-schemas/examples/v1/m.room.avatar b/event-schemas/examples/v1/m.room.avatar new file mode 100644 index 00000000..9fb1189c --- /dev/null +++ b/event-schemas/examples/v1/m.room.avatar @@ -0,0 +1,18 @@ +{ + "age": 242352, + "content": { + "info": { + "h": 398, + "w": 394, + "mimetype": "image/jpeg", + "size": 31037 + }, + "url": "mxc://localhost/JWEIFJgwEIhweiWJE" + }, + "origin_server_ts": 1431961217939, + "event_id": "$WLGTSEFSEF:localhost", + "type": "m.room.avatar", + "state_key": "", + "room_id": "!Cuyf34gef24t:localhost", + "user_id": "@example:localhost" +} diff --git a/event-schemas/schema/v1/m.room.avatar b/event-schemas/schema/v1/m.room.avatar new file mode 100644 index 00000000..276c975c --- /dev/null +++ b/event-schemas/schema/v1/m.room.avatar @@ -0,0 +1,64 @@ +{ + "title": "RoomAvatar", + "description": "A picture that is associated with the room. This can be displayed alongside the room information.", + "type": "object", + "allOf": [{ + "$ref": "core-event-schema/state_event.json" + }], + "properties": { + "content": { + "type": "object", + "properties": { + "url": { + "type": "string", + "description": "The URL to the image." + }, + "thumbnail_url": { + "type": "string", + "description": "The URL to the thumbnail of the image." + }, + "thumbnail_info": { + "type": "object", + "title": "ImageInfo", + "description": "Metadata about the image referred to in ``thumbnail_url``.", + "allOf": [{ + "$ref": "core-event-schema/msgtype_infos/image_info.json" + }] + }, + "info": { + "type": "object", + "title": "ImageInfo", + "description": "Metadata about the image referred to in ``url``.", + "properties": { + "size": { + "type": "integer", + "description": "Size of the image in bytes." + }, + "w": { + "type": "integer", + "description": "The width of the image in pixels." + }, + "h": { + "type": "integer", + "description": "The height of the image in pixels." + }, + "mimetype": { + "type": "string", + "description": "The mimetype of the image, e.g. ``image/jpeg``." + } + } + } + }, + "required": ["url"] + }, + "state_key": { + "type": "string", + "description": "A zero-length string.", + "pattern": "^$" + }, + "type": { + "type": "string", + "enum": ["m.room.avatar"] + } + } +} diff --git a/specification/modules/instant_messaging.rst b/specification/modules/instant_messaging.rst index 0b4e3e64..09fcb843 100644 --- a/specification/modules/instant_messaging.rst +++ b/specification/modules/instant_messaging.rst @@ -30,6 +30,8 @@ Usage of this event is discouraged for several reasons: {{m_room_topic_event}} +{{m_room_avatar_event}} + m.room.message msgtypes ~~~~~~~~~~~~~~~~~~~~~~~