matrix-spec/event-schemas/schema/m.room.message#m.server_notice
Travis Ralston 5eea4a477f Add server notices support
As per [MSC1452](https://github.com/matrix-org/matrix-doc/issues/1452) 

Fixes https://github.com/matrix-org/matrix-doc/issues/1254

Although MSC1452 focuses on just the warnings part of the server notices, the base for notices has not been established in the spec. This commit adds the needed support to be able to handle notices.

No intentional divergences from the proposal are included in this changeset. There are a few additions which are used in practice although not defined in the proposal, such as who is responsible for aesthetics, sending notices, and other misc rules.
2019-05-26 20:52:59 -06:00

40 lines
1 KiB
Plaintext

---
allOf:
- $ref: core-event-schema/room_event.yaml
description: Represents a server notice for a user.
properties:
content:
properties:
body:
description: A human-readable description of the notice.
type: string
msgtype:
enum:
- m.server_notice
type: string
server_notice_type:
description: |-
The type of notice being represented.
type: string
admin_contact:
description: |-
A URI giving a contact method for the server administrator. Required if the
notice type is ``m.server_notice.usage_limit_reached``.
type: string
limit_type:
description: |-
The kind of usage limit the server has exceeded. Required if the notice type is
``m.server_notice.usage_limit_reached``.
type: string
required:
- msgtype
- body
- server_notice_type
type: object
type:
enum:
- m.room.message
type: string
title: ServerNoticeMessage
type: object