Clarifications to AS spec, including MSC3905 (#1305)
Primarily this is the spec for MSC3905, but I've also taken the opportunity to clean up the section a bit and move the definition out to a .yaml file.pull/1330/head
parent
830f80f56a
commit
1945589acf
@ -0,0 +1 @@
|
||||
Clarify that application services can only register an interest in local users, as per [MSC3905](https://github.com/matrix-org/matrix-spec-proposals/issues/3905).
|
@ -0,0 +1,28 @@
|
||||
# Copyright 2022 The Matrix.org Foundation C.I.C
|
||||
#
|
||||
# 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.
|
||||
|
||||
type: array
|
||||
items:
|
||||
type: object
|
||||
title: Namespace
|
||||
properties:
|
||||
regex:
|
||||
type: string
|
||||
description: A POSIX regular expression defining which values this namespace includes.
|
||||
exclusive:
|
||||
type: boolean
|
||||
description: A true or false value stating whether this application service has exclusive access to events within this namespace.
|
||||
required:
|
||||
- regex
|
||||
- exclusive
|
@ -0,0 +1,74 @@
|
||||
# Copyright 2022 The Matrix.org Foundation C.I.C
|
||||
#
|
||||
# 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.
|
||||
|
||||
type: object
|
||||
title: Registration
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
description: A unique, user-defined ID of the application service which will never change.
|
||||
url:
|
||||
type: string
|
||||
description: The URL for the application service. May include a path after the domain name. Optionally set to null if no traffic is required.
|
||||
as_token:
|
||||
type: string
|
||||
description: A secret token that the application service will use to authenticate requests to the homeserver.
|
||||
hs_token:
|
||||
type: string
|
||||
description: A secret token that the homeserver will use authenticate requests to the application service.
|
||||
sender_localpart:
|
||||
type: string
|
||||
description: The localpart of the user associated with the application service.
|
||||
namespaces:
|
||||
type: object
|
||||
title: Namespaces
|
||||
description: The namespaces that the application service is interested in.
|
||||
properties:
|
||||
users:
|
||||
allOf:
|
||||
- $ref: namespace_list.yaml
|
||||
- description: |-
|
||||
A list of namespaces defining the user IDs that the application
|
||||
service is interested in. Events will be sent to the AS if a
|
||||
local user matching one of the namespaces is the target of the event,
|
||||
or is a joined member of the room where the event occurred.
|
||||
rooms:
|
||||
allOf:
|
||||
- $ref: namespace_list.yaml
|
||||
- description: |-
|
||||
A list of namespaces defining the room IDs that the application
|
||||
service is interested in. All events sent in a room with an ID
|
||||
which matches one of the namespaces will be sent to the AS.
|
||||
aliases:
|
||||
allOf:
|
||||
- $ref: namespace_list.yaml
|
||||
- description: |-
|
||||
A list of namespaces defining the room aliases that the application
|
||||
service is interested in. All events sent in a room with an alias
|
||||
which matches one of the namespaces will be sent to the AS.
|
||||
rate_limited:
|
||||
type: boolean
|
||||
description: Whether requests from masqueraded users are rate-limited. The sender is excluded.
|
||||
protocols:
|
||||
type: array
|
||||
description: The external protocols which the application service provides (e.g. IRC).
|
||||
items:
|
||||
type: string
|
||||
required:
|
||||
- id
|
||||
- url
|
||||
- as_token
|
||||
- hs_token
|
||||
- sender_localpart
|
||||
- namespaces
|
Loading…
Reference in New Issue