Commit graph

44 commits

Author SHA1 Message Date
Travis Ralston
90a898d03f Move dispatcher into a subdirectory
We're expecting to have a whole bunch of types for the dispatched payloads, so pull the thing into a directory we can throw them in.
2020-05-13 21:07:50 -06:00
Travis Ralston
35dd892dce
Merge pull request #4458 from matrix-org/travis/fix-sticker-picker-add
Use WidgetType more often to avoid breaking new sticker pickers
2020-04-23 08:18:12 -06:00
Travis Ralston
3a360b91b9 Update logging for unmanaged widgets, and add TODO comments for other areas
Just a minor thing that is bothersome. Renaming classes and functions is a bit more of an impact than is worth right now, so have settled for littering TODO comments all over the place.
2020-04-22 00:34:08 -06:00
Travis Ralston
f54e99c708 Use WidgetType more often to avoid breaking new sticker pickers
Turns out that setUserWidget() wasn't updated to take a real WidgetType, but the code in ScalarMessaging thought it did. This leads to integration managers trying to add sticker widgets with an object `type` rather than a string `type`, which doesn't work.

This updates other code paths which call into the various widget classes to use WidgetType more often. The actual code path for fixing widgets is resolved in WidgetUtils for the setUserWidget function body.
2020-04-21 16:01:10 -06:00
Travis Ralston
4fe16b1b84
Merge branch 'develop' into travis/moar-jitsi 2020-04-14 12:57:28 -06:00
Travis Ralston
b4b0c4c6df Add comments to highlight where we'll need m.widget support
For https://github.com/vector-im/riot-web/issues/13111
2020-04-09 15:14:07 -06:00
Travis Ralston
dc92f557fd Support m.jitsi-typed widgets as Jitsi widgets
Fixes https://github.com/vector-im/riot-web/issues/9268
2020-04-09 15:11:57 -06:00
David Baker
274eb75c38 Remove get-config API
which is no longer necessary now the jitsi wrapper has its own
external-api script
2020-04-01 10:40:03 +01:00
David Baker
538147f7fa Better support for widgets overriding their URLs
Move the URL processing into AppTile so that the widget can have a
URL used for embedding in the page and a separate one for popping
out into a browser.
2020-04-01 10:00:33 +01:00
Travis Ralston
bdcb65de77 Support and send the config over to capable widgets
For https://github.com/vector-im/riot-web/pull/12845
2020-03-24 09:55:54 -06:00
Travis Ralston
f7bf0d013c Support sending and receiving v1 Jitsi widgets
Fixes https://github.com/vector-im/riot-web/issues/12816
Fixes https://github.com/vector-im/riot-web/issues/12814
2020-03-23 10:18:30 -06:00
Michael Telatynski
8822bb06f1
Update WidgetUtils.js 2020-03-22 02:14:50 +00:00
Michael Telatynski
506927ad8a change to defaults
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2020-03-21 10:49:55 +00:00
Michael Telatynski
ca02ff493c Fix local jitsi build url fail and missing argument
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2020-03-21 10:42:07 +00:00
Travis Ralston
92251316a3 Switch to named object 2020-03-19 11:51:01 -06:00
Travis Ralston
8519a83b61 Appease the linter 2020-03-18 15:58:57 -06:00
Travis Ralston
9da57817d1 Use a local wrapper for Jitsi calls
Requires https://github.com/vector-im/riot-web/pull/12780
2020-03-18 15:50:12 -06:00
Travis Ralston
042bd35d79 Fix MatrixClientPeg imports 2019-12-22 21:15:54 -07:00
Travis Ralston
b185eed462 Wire up the widget permission prompt to the cross-platform setting
This doesn't have any backwards compatibility with anyone who has already clicked "Allow". We kinda want everyone to read the new prompt, so what better way to do it than effectively revoke all widget permissions?

Part of https://github.com/vector-im/riot-web/issues/11262
2019-11-18 17:56:33 -07:00
Travis Ralston
f5ec9eb8f4 Ensure widgets always have a sender associated with them
Fixes https://github.com/vector-im/riot-web/issues/11419
2019-11-18 13:16:36 -07:00
David Baker
d82a05fbae Fix integration manager not updating when set
setUserWidget was modifying the content of the old event itself,
so when `waitForUserWidget()` checked the content to see if it was
there yet, it was, but because the echo hadn't come back, the
IntegrationManager hadn't rebuilt its list.

In other news, its terrifying that we can just accidentally modify
the content of an event in the store. I'm going to make a js-sdk
PR that freezes the content and see what breaks...

Fixes https://github.com/vector-im/riot-web/issues/10977
2019-10-02 15:26:54 +01:00
Bruno Windels
166364ba03 Fix: make sure scalarUrls is never undefined 2019-09-16 10:12:15 +02:00
Travis Ralston
19b7d18e7a No-op removals of widgets that don't exist
An example of this is setting your very first widget: there's nothing to remove, so you end up with "cannot call .getContent() of undefined" instead.
2019-08-21 18:43:29 -06:00
Travis Ralston
b77be2d380 Just use MSC1957 2019-08-14 09:33:02 -06:00
Travis Ralston
8b1c90a01e Convert to using im.vector.integration_manager for IM widget
This avoids us having to throw the entirety of MSC1957 into the queue, particularly when we're only using a third of the MSC.
2019-08-14 08:57:38 -06:00
Travis Ralston
03d735f4ed Support changing your integration manager in the UI
Part of https://github.com/vector-im/riot-web/issues/10161
2019-08-12 15:40:50 -06:00
Travis Ralston
74ce5c3541 Read integration managers from account data
For https://github.com/vector-im/riot-web/issues/4913 / https://github.com/vector-im/riot-web/issues/10161

Relies on the structure defined by [MSC1957](https://github.com/matrix-org/matrix-doc/pull/1957)

This is just the bit of code to parse the user's widgets (while watching for changes) and allow for it to be the default manager.
2019-08-09 17:35:59 -06:00
Travis Ralston
018b4f5d41 Use the default integration manager for config options 2019-08-09 17:08:26 -06:00
Travis Ralston
2dcb40f1be Track OpenID automatic permissions by (widgetLocation, widgetUrl) 2019-03-23 23:25:31 -06:00
Bruno Windels
908de56c6d replace getMember(myId).membership with getMyMembership
This works with rooms which haven't had their members
loaded yet.
2018-08-02 11:42:05 +02:00
David Baker
7aab6fa6f1 Merge remote-tracking branch 'origin/develop' into dbkr/widget_echo 2018-07-18 09:35:57 +01:00
David Baker
983dc3ad2e lint 2018-07-16 16:19:18 +01:00
David Baker
0f32c3a018 PR feedback 2018-07-16 13:18:10 +01:00
David Baker
e56feea9ec Put always-on-screen widgets in top left
always-on-screen widgets now appear in the top-left where the
call preview normally is if you're not in the room that they're in.

Fixes https://github.com/vector-im/riot-web/issues/7007
Based off https://github.com/matrix-org/matrix-react-sdk/pull/2053
2018-07-12 18:43:49 +01:00
David Baker
c26b300f30 more comments 2018-07-05 19:58:10 +01:00
David Baker
eb552e5cef Just pass the roomId into WidgetEchoStore 2018-07-05 18:43:20 +01:00
David Baker
c665ab8a22 Add error dialog if widget remove fails
Also up the timeout because matrix.org is that slow
2018-07-03 11:55:41 +01:00
David Baker
8b64ddcbe8 Do some level of local echo for widgets
* Show a spinner while we wait for widgets to be deleted
 * Hide widgets while they're pending deletion
 * Don't put another jitsi widget into the room if there's already
   one pending
2018-07-03 11:16:44 +01:00
David Baker
c780cd05a8 Change argument order of setRoomWidget
So when deleting a widget we can just omit the ones we don't need
2018-06-26 16:33:28 +01:00
David Baker
cb89406d3e Indent 2018-06-26 15:42:29 +01:00
David Baker
4a39297e65 PR feedback 2018-06-26 15:41:43 +01:00
David Baker
0a6450507e Bits of PR feedback 2018-06-26 15:21:22 +01:00
David Baker
ca8a4a0c3f Remove unused function 2018-06-26 12:08:33 +01:00
David Baker
6cf11a15e6 Move WidgetUtils to utils dir 2018-06-26 11:59:16 +01:00
Renamed from src/WidgetUtils.js (Browse further)