MSC4352: clarify non-in-app usage and linkify-to-matrix: on send; wrap to ~120 chars

Signed-off-by: Igor Somov <donprusne@gmail.com>
pull/4352/head
Igor Somov 3 months ago
parent 37d752a8f7
commit bd957ecfd1

@ -60,15 +60,36 @@ Clients MUST validate that the discovered value is a valid HTTPS origin and MUST
### 3. Generation algorithm (normative) ### 3. Generation algorithm (normative)
When a client needs an HTTPS permalink (e.g., for emails, social platforms, or contexts without a `matrix:` handler): **Scope:** This algorithm applies **only** to generating HTTPS permalinks for **outsideMatrix** contexts (e.g. email,
social networks, the web). Clients **MUST NOT** use resolverbased HTTPS links for inapp mentions/links/navigation.
1. Determine `permalink_base_url` by the precedence above. 1. Determine `permalink_base_url` by the precedence in Section 2 (user override → wellknown → client default).
2. Construct the permalink path using the **matrix.to navigation grammar** from the spec (identifier encoding, optional 2. Construct the path using the matrix.to navigation grammar defined by the spec (identifier encoding, optional event
event segment, `via` routing parameters, etc.). segment, routing parameters like `via`, etc.).
3. Produce `https://permalink_base_url/#/<encoded identifier>[/<encoded event>][?<args>]`. 3. Produce `https://<permalink_base_url>/#/<encoded identifier>[/<encoded event>][?<args>]`.
> Note: Clients SHOULD continue to prefer the `matrix:` URI scheme where appropriate (in-app deep linking, OS-level Clients **SHOULD** continue to prefer the `matrix:` URI scheme for deeplinking whenever appropriate.
> handlers). HTTPS permalinks remain the web-friendly representation.
#### Inapp usage (normative)
Clients **MUST NOT** use resolverbased HTTPS permalinks for inapp links (mentions, room/event links, or any links
displayed to Matrix users). Clients **MUST** prefer the `matrix:` URI scheme (or native navigation) for all inapp UX.
#### Sending links in Matrix (normative)
When a user types/pastes a resolverstyle HTTPS permalink in a message composer, the client **SHOULD** preserve the
visible text but **MUST** emit, in `formatted_body`, an anchor whose `href` is the equivalent `matrix:` URI, to ensure
crossclient interoperability. The plaintext `body` may keep the original text.
#### Receiving (parsing)
Clients **MUST** handle `matrix:` URIs. Clients **MAY** additionally recognise HTTPS permalinks that follow the
matrix.to navigation grammar regardless of hostname, but this is **not required** by this MSC.
#### Nongoals
This MSC does **not** standardise applying resolver prefixes to inapp mentions or inapp permalinks. Clients **MUST
NOT** rewrite mentions or inapp links to use resolver domains.
### 4. Resolution behavior ### 4. Resolution behavior

Loading…
Cancel
Save