From 70e69a110a5471417e0ce961f0afb8ef9b9d9e9b Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Thu, 3 Sep 2020 09:00:36 -0600 Subject: [PATCH] Move the avatar up a level --- proposals/2765-widget-avatars.md | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/proposals/2765-widget-avatars.md b/proposals/2765-widget-avatars.md index 1849fae4..14facbb2 100644 --- a/proposals/2765-widget-avatars.md +++ b/proposals/2765-widget-avatars.md @@ -5,7 +5,7 @@ for a favicon-like experience. This proposal introduces such a concept. ## Proposal -In the widget's `data`, a new optional paramater named `avatar_url` is added. This parameter is +A new optional paramater named `avatar_url` is added to the widget definition. This parameter is an MXC URI to an image clients can use to associate with the widget, likely alongside the `name` and/or `title`. @@ -16,6 +16,24 @@ use case. Rendering avatars is optional for clients, much like how clients are not required to use the `name` or `title` of a widget. +An example widget would be: + +```json +{ + "creatorUserId": "@alice:example.org", + "data": { + "custom-key": "This is a custom key", + "title": "This is a witty description for the widget" + }, + "id": "20200827_WidgetExample", + "name": "My Cool Widget", + "type": "m.custom", + "url": "https://example.org/my/widget.html?roomId=$matrix_room_id", + "waitForIframeLoad": true, + "avatar_url": "mxc://example.org/abc123" +} +``` + ## Alternatives We could define a whole structured system for different thumbnail sizes, though we have a thumbnail @@ -28,5 +46,6 @@ from the server when a widget avatar is a non-image. ## Unstable prefix -Not applicable - this is backwards compatible with specification and an allowed property of `data` -without this MSC. +While this MSC is not in a released version of the specification, clients should use an alternative +event type for widgets or use `org.matrix.msc2765.avatar_url` when using `m.widget` or `m.widgets` +as an event type.