Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Add new widget API actions for changing rooms and sending/receiving events #5385

Merged
merged 15 commits into from
Nov 20, 2020

Conversation

turt2live
Copy link
Member

@turt2live turt2live commented Nov 3, 2020

MSC for sending/receiving events: matrix-org/matrix-spec-proposals#2762
Requires matrix-org/matrix-widget-api#9 (review first please)
Requires matrix-org/matrix-widget-api#14

This is split into individual commits for easy review.

The view_room action is custom to Element and thus has no associated MSC. The send/receive events stuff is aligned with MSC2762 as it is currently written.

All of the new actions are controlled by capabilities, with the following dialog introduced:
image

Note: the actual design is different, however some of the elements we just don't have yet so this is an approximation of that design. The designs cannot be linked publicly.

Part of MSC2762: matrix-org/matrix-spec-proposals#2762
Requires: matrix-org/matrix-widget-api#9

This is the bare minimum required to send an event to a widget and receive events from widgets. Like the view_room action, this is controlled by a well-known permission key.

**Danger**: This allows widgets to potentially modify room state. Use the permissions with care.
@turt2live
Copy link
Member Author

Test failures are expected because the CI doesn't do branch matching on the widget-api (and shouldn't, imo)

@turt2live turt2live requested a review from dbkr November 12, 2020 17:39
@turt2live
Copy link
Member Author

(this side is blocked on internal discussion)

@turt2live turt2live requested review from a team and removed request for dbkr November 18, 2020 03:39
@turt2live turt2live removed the request for review from a team November 19, 2020 19:06
@turt2live
Copy link
Member Author

Build is expected to fail until matrix-org/matrix-widget-api#14 lands

@turt2live turt2live requested a review from a team November 19, 2020 19:17
Copy link
Member

@dbkr dbkr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Thanks for adding the permissions stuff.

@turt2live turt2live merged commit 5f47077 into develop Nov 20, 2020
@turt2live turt2live deleted the travis/msc-send-widget-events branch November 20, 2020 16:17
turt2live added a commit that referenced this pull request Nov 20, 2020
Following #5385, it is now possible for a widget to request these capabilities without being a video conference or sticker picker. This commit actually enables this support for those kinds of widgets.

This commit also fixes an issue in the URL templating where some variables might get set to 'undefined' - this appears to be a scoping issue, so StopGapWidget now stores the definition alongside the superclass. 

Fixes element-hq/element-web#15001
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants