Merge branches 'master' and 'notifications/room' of github.com:matrix-org/matrix-doc into notifications/room
commit
992bc8828a
@ -0,0 +1,44 @@
|
||||
# Copyright 2018 Kamax Sàrl
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
swagger: "2.0"
|
||||
info:
|
||||
title: "Matrix Client-Identity Versions API"
|
||||
version: "1.0.0"
|
||||
host: localhost:8090
|
||||
schemes:
|
||||
- https
|
||||
basePath: /_matrix/identity
|
||||
produces:
|
||||
- application/json
|
||||
paths:
|
||||
"/api/v1":
|
||||
get:
|
||||
summary: Checks that an Identity server is available at this API endpopint.
|
||||
description: |-
|
||||
Checks that an Identity server is available at this API endpopint.
|
||||
|
||||
To discover that an Identity server is available at a specific URL,
|
||||
this endpoint can be queried and will return an empty object.
|
||||
|
||||
This is primarly used for auto-discovery and health check purposes
|
||||
by entities acting as a client for the Identity server.
|
||||
operationId: ping
|
||||
responses:
|
||||
200:
|
||||
description: An Identity server is ready to serve requests.
|
||||
examples:
|
||||
application/json: {}
|
||||
schema:
|
||||
type: object
|
@ -0,0 +1,8 @@
|
||||
{
|
||||
"type": "m.ignored_user_list",
|
||||
"content": {
|
||||
"ignored_users": {
|
||||
"@someone:domain.com": {}
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,25 @@
|
||||
{
|
||||
"age": 242352,
|
||||
"content": {
|
||||
"body": "Landing",
|
||||
"info": {
|
||||
"mimetype": "image/png",
|
||||
"thumbnail_info": {
|
||||
"mimetype": "image/png",
|
||||
"h": 200,
|
||||
"w": 140,
|
||||
"size": 73602
|
||||
},
|
||||
"h": 200,
|
||||
"thumbnail_url": "mxc://matrix.org/sHhqkFCvSkFwtmvtETOtKnLP",
|
||||
"w": 140,
|
||||
"size": 73602
|
||||
},
|
||||
"url": "mxc://matrix.org/sHhqkFCvSkFwtmvtETOtKnLP"
|
||||
},
|
||||
"origin_server_ts": 1431961217939,
|
||||
"event_id": "$WLGTSEFSEF:localhost",
|
||||
"type": "m.sticker",
|
||||
"room_id": "!Cuyf34gef24t:localhost",
|
||||
"sender": "@example:localhost"
|
||||
}
|
@ -0,0 +1,28 @@
|
||||
---
|
||||
allOf:
|
||||
- $ref: core-event-schema/event.yaml
|
||||
description: |-
|
||||
A map of users which are considered ignored is kept in ``account_data``
|
||||
in an event type of ``m.ignored_user_list``.
|
||||
properties:
|
||||
content:
|
||||
type: object
|
||||
properties:
|
||||
ignored_users:
|
||||
type: object
|
||||
title: "Ignored users"
|
||||
description: "The map of users to ignore"
|
||||
patternProperties:
|
||||
"^@":
|
||||
type: "object"
|
||||
title: "Ignored User"
|
||||
description: "An empty object for future enhancement"
|
||||
x-pattern: "$USER_ID"
|
||||
required:
|
||||
- ignored_users
|
||||
type:
|
||||
enum:
|
||||
- m.ignored_user_list
|
||||
type: string
|
||||
title: Ignored User List
|
||||
type: object
|
@ -0,0 +1,34 @@
|
||||
---
|
||||
allOf:
|
||||
- $ref: core-event-schema/room_event.yaml
|
||||
description: This message represents a single sticker image.
|
||||
properties:
|
||||
content:
|
||||
properties:
|
||||
body:
|
||||
description: |-
|
||||
A textual representation or associated description of the sticker
|
||||
image. This could be the alt text of the original image, or a message
|
||||
to accompany and further describe the sticker.
|
||||
type: string
|
||||
info:
|
||||
allOf:
|
||||
- $ref: core-event-schema/msgtype_infos/image_info.yaml
|
||||
description: |-
|
||||
Metadata about the image referred to in ``url`` including a thumbnail
|
||||
representation.
|
||||
url:
|
||||
description: |-
|
||||
The URL to the sticker image. This must be a valid ``mxc://`` URI.
|
||||
type: string
|
||||
required:
|
||||
- body
|
||||
- info
|
||||
- url
|
||||
type: object
|
||||
type:
|
||||
enum:
|
||||
- m.sticker
|
||||
type: string
|
||||
title: StickerMessage
|
||||
type: object
|
@ -1,6 +1,6 @@
|
||||
continuserv proactively re-generates the spec on filesystem changes, and serves it over HTTP.
|
||||
|
||||
To run it, you must install the `go` tool. You will also need to install fsnotify by running:
|
||||
`go get gopkg.in/fsnotify.v1`
|
||||
`go get gopkg.in/fsnotify/fsnotify.v1`
|
||||
You can then run continuserv by running:
|
||||
`go run main.go`
|
||||
|
@ -0,0 +1,62 @@
|
||||
.. Copyright 2018 Travis Ralston
|
||||
..
|
||||
.. Licensed under the Apache License, Version 2.0 (the "License");
|
||||
.. you may not use this file except in compliance with the License.
|
||||
.. You may obtain a copy of the License at
|
||||
..
|
||||
.. http://www.apache.org/licenses/LICENSE-2.0
|
||||
..
|
||||
.. Unless required by applicable law or agreed to in writing, software
|
||||
.. distributed under the License is distributed on an "AS IS" BASIS,
|
||||
.. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
.. See the License for the specific language governing permissions and
|
||||
.. limitations under the License.
|
||||
|
||||
Ignoring Users
|
||||
==============
|
||||
|
||||
.. _module:ignore_users:
|
||||
|
||||
With all the communication through Matrix it may be desirable to ignore a
|
||||
particular user for whatever reason. This module defines how clients and
|
||||
servers can implement the ignoring of users.
|
||||
|
||||
Events
|
||||
------
|
||||
|
||||
{{m_ignored_user_list_event}}
|
||||
|
||||
Client behaviour
|
||||
----------------
|
||||
To ignore a user, effectively blocking them, the client should add the target
|
||||
user to the ``m.ignored_user_list`` event in their account data using
|
||||
|/user/<user_id>/account_data/<type>|_. Once ignored, the client will no longer
|
||||
receive events sent by that user, with the exception of state events. The client
|
||||
should either hide previous content sent by the newly ignored user or perform
|
||||
a new ``/sync`` with no previous token.
|
||||
|
||||
Invites to new rooms by ignored users will not be sent to the client. The server
|
||||
may optionally reject the invite on behalf of the client.
|
||||
|
||||
State events will still be sent to the client, even if the user is ignored.
|
||||
This is to ensure parts, such as the room name, do not appear different to the
|
||||
user just because they ignored the sender.
|
||||
|
||||
To remove a user from the ignored users list, remove them from the account data
|
||||
event. The server will resume sending events from the previously ignored user,
|
||||
however it should not send events that were missed while the user was ignored.
|
||||
To receive the events that were sent while the user was ignored the client
|
||||
should perform a fresh sync. The client may also un-hide any events it previously
|
||||
hid due to the user becoming ignored.
|
||||
|
||||
Server behaviour
|
||||
----------------
|
||||
Following an update of the ``m.ignored_user_list``, the sync API for all clients
|
||||
should immediately start ignoring (or un-ignoring) the user. Clients are responsible
|
||||
for determining if they should hide previously sent events or to start a new sync
|
||||
stream.
|
||||
|
||||
Servers must still send state events sent by ignored users to clients.
|
||||
|
||||
Servers must not send room invites from ignored users to clients. Servers may
|
||||
optionally decide to reject the invite, however.
|
@ -0,0 +1,53 @@
|
||||
.. Copyright 2018 New Vector Ltd.
|
||||
..
|
||||
.. Licensed under the Apache License, Version 2.0 (the "License");
|
||||
.. you may not use this file except in compliance with the License.
|
||||
.. You may obtain a copy of the License at
|
||||
..
|
||||
.. http://www.apache.org/licenses/LICENSE-2.0
|
||||
..
|
||||
.. Unless required by applicable law or agreed to in writing, software
|
||||
.. distributed under the License is distributed on an "AS IS" BASIS,
|
||||
.. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
.. See the License for the specific language governing permissions and
|
||||
.. limitations under the License.
|
||||
|
||||
Sticker Messages
|
||||
================
|
||||
|
||||
.. _module:stickers:
|
||||
|
||||
This module allows users to send sticker messages in to rooms or direct
|
||||
messaging sessions.
|
||||
|
||||
Sticker messages are specialised image messages that are displayed without
|
||||
controls (e.g. no "download" link, or light-box view on click, as would be
|
||||
displayed for for `m.image`_ events).
|
||||
|
||||
Sticker messages are intended to provide simple "reaction" events in the message
|
||||
timeline. The matrix client should provide some mechanism to display the sticker
|
||||
"body" e.g. as a tooltip on hover, or in a modal when the sticker image is
|
||||
clicked.
|
||||
|
||||
Events
|
||||
------
|
||||
Sticker events are received as a single ``m.sticker`` event in the
|
||||
``timeline`` section of a room, in a ``/sync``.
|
||||
|
||||
{{m_sticker_event}}
|
||||
|
||||
Client behaviour
|
||||
----------------
|
||||
|
||||
Clients supporting this message type should display the image content from the
|
||||
event URL directly in the timeline.
|
||||
|
||||
A thumbnail image should be provided in the ``info`` object. This is
|
||||
largely intended as a fallback for clients that do not fully support the
|
||||
``m.sticker`` event type. In most cases it is fine to set the thumbnail URL to the
|
||||
same URL as the main event content.
|
||||
|
||||
It is recommended that sticker image content should be 512x512 pixels in size
|
||||
or smaller. The dimensions of the image file should be twice the intended
|
||||
display size specified in the ``info`` object in order to assist
|
||||
rendering sharp images on higher DPI screens.
|
Loading…
Reference in New Issue