mirror of
https://github.com/matrix-org/matrix-spec
synced 2026-04-28 13:24:10 +02:00
Allow room tags to have asssociated content, and return that content in the m.tag events
This commit is contained in:
parent
f557e69860
commit
52f55e0542
|
|
@ -49,16 +49,15 @@ paths:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
tags:
|
tags:
|
||||||
type: array
|
title: Tags
|
||||||
items:
|
type: object
|
||||||
type: string
|
|
||||||
examples:
|
examples:
|
||||||
application/json: |-
|
application/json: |-
|
||||||
{
|
{
|
||||||
"tags": [
|
"tags": {
|
||||||
"work",
|
"work": {"order": 1},
|
||||||
"pinned"
|
"pinned": {}
|
||||||
]
|
}
|
||||||
}
|
}
|
||||||
"/user/{userId}/rooms/{roomId}/tags/{tag}":
|
"/user/{userId}/rooms/{roomId}/tags/{tag}":
|
||||||
put:
|
put:
|
||||||
|
|
@ -94,11 +93,11 @@ paths:
|
||||||
name: body
|
name: body
|
||||||
required: true
|
required: true
|
||||||
description: |-
|
description: |-
|
||||||
An empty JSON object.
|
Extra data for the tag, e.g. ordering.
|
||||||
schema:
|
schema:
|
||||||
type: object
|
type: object
|
||||||
example: |-
|
example: |-
|
||||||
{}
|
{"order": 1}
|
||||||
responses:
|
responses:
|
||||||
200:
|
200:
|
||||||
description:
|
description:
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
{
|
{
|
||||||
"type": "m.tag",
|
"type": "m.tag",
|
||||||
"content": {
|
"content": {
|
||||||
"tags": [
|
"tags": {
|
||||||
"work"
|
"work": {}
|
||||||
]
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -11,9 +11,10 @@
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
"tags": {
|
"tags": {
|
||||||
"type": "array",
|
"type": "object",
|
||||||
"items": {
|
"additionalProperties": {
|
||||||
"type": "string"
|
"title": "Tag",
|
||||||
|
"type": "object"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -18,6 +18,9 @@ The ``m.tag`` can also be received in a v1 /events response or in the
|
||||||
events appearing in v1 /events will have a ``room_id`` with the room
|
events appearing in v1 /events will have a ``room_id`` with the room
|
||||||
the tags are for.
|
the tags are for.
|
||||||
|
|
||||||
|
Each tag has an associated JSON object with information about the tag, e.g how
|
||||||
|
to order the tags.
|
||||||
|
|
||||||
{{m_tag_event}}
|
{{m_tag_event}}
|
||||||
|
|
||||||
Client Behaviour
|
Client Behaviour
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue