Commit Graph

92 Commits (5a17406fe97ed2b1dad888f7cefacd0303cc8128)

Author SHA1 Message Date
Michael Telatynski d4d51dc61f Rip out the remainder of Bluebird 2019-11-18 10:03:05 +00:00
Michael Telatynski 168b1b68bb Revert "s/.done(/.then(/ since modern es6 track unhandled promise exceptions"
This reverts commit 09a8fec2
2019-11-12 11:56:21 +00:00
Michael Telatynski 09a8fec261 s/.done(/.then(/ since modern es6 track unhandled promise exceptions 2019-11-12 11:51:23 +00:00
Travis Ralston 160396ca9e Appease the linter 2019-08-23 09:16:44 -06:00
Travis Ralston b3cda4b19a Support multiple integration managers behind a labs flag
Fixes https://github.com/vector-im/riot-web/issues/10622
Implements [MSC1957](https://github.com/matrix-org/matrix-doc/pull/1957)

Design is not final.
2019-08-23 09:12:40 -06:00
Travis Ralston 3a4c6f3eac Appease the linter again 2019-08-09 17:20:37 -06:00
Travis Ralston 018b4f5d41 Use the default integration manager for config options 2019-08-09 17:08:26 -06:00
J. Ryan Stinnett 60adbdc2eb Remove logging of origin mismatch 2019-07-17 09:42:04 +01:00
J. Ryan Stinnett d57a0dec64 Use URL to parse IM origins
This allows the configuration for `integrations_ui_url` to be more flexible. In
particular, it no longer matters whether you include a trailing slash after the
port, for example.
2019-07-12 19:18:34 +01:00
J. Ryan Stinnett dc9b5fa996 Log when integration manager origin is invalid 2019-07-12 19:04:20 +01:00
David Baker f679acea08
Revert "Revert "Fix showing peek preview while LL members are loading"" 2018-08-22 16:35:58 +01:00
David Baker bf7633250a
Revert "Fix showing peek preview while LL members are loading" 2018-08-22 16:16:17 +01:00
Bruno Windels a54629276f use getJoinedMemberCount() instead of getJoinedMembers().length as the latter doesnt take LL into account 2018-08-22 14:08:18 +02:00
Bruno Windels 860c6355f0 do self membership checks with getMyMembership elsewhere as well 2018-08-22 14:06:28 +02: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 b6f3b2f594 More code re-use 2018-06-26 12:28:59 +01:00
David Baker 6cf11a15e6 Move WidgetUtils to utils dir 2018-06-26 11:59:16 +01:00
David Baker 0f2c47937c Merge the two different widget utils files 2018-06-26 11:52:21 +01:00
David Baker 069080e7ed lint 2018-06-26 09:41:20 +01:00
David Baker 5c8eeff08a Refactor widgets code
Split logic out of setWidget & re-use it when we add jitsi widgets.

Also fix the detection of existing jitsi widgets and make that use
getRoomWidgets() too.

Add error message when a jitsi call is already in process.
2018-06-25 15:30:04 +01:00
David Baker 94125fb566 Fix widgets re-appearing after being deleted
Widgets would sometimes briefly re-appear after having been deleted.
This was because of the following race:
 * User presses delete, send POST req, we set `deleting`. Widget hides.
 * POST request completes, we unset `deleting` so widget unhides.
 * State event comes down sync so widget hides again.

This fixes this by introducing `waitForRoomWidget` and using it to
wait until the state event comes down the sync until clearing the
`deleting` flag.

Since we now have `waitForRoomWidget`, this also uses it when adding
a widget so the 'widget saved' appears at the same time the widget
does.
2018-06-13 15:50:19 +01:00
David Baker 1cb794753e Simplify & refactor some widget stuff
* ScalarMessaging onMessage was getting the current room ID by listening
  for view_and remembering the room id or alias, and so having to look up
  the alias if it was alias. We have RoomViewStore for this.
 * Move waitForUserWidget into WidgetUtils
 * s/require/import/
2018-06-13 10:39:52 +01:00
David Baker fadf264a1b Rename uses of function too 2018-05-15 17:34:02 +01:00
David Baker e4a221e42d More helpful function name 2018-05-15 17:28:55 +01:00
David Baker bb5ae741bc Wait for deletion of widgets as well addition
We were previously waiting for them to appear which is silly if we
were deleting them.
2018-05-15 17:12:59 +01:00
David Baker 9d5ba25131 oh, sendError does support sending the error 2018-05-15 15:19:28 +01:00
David Baker 464e093f40 log exception 2018-05-15 15:14:33 +01:00
David Baker 5b781043a5 just use the one if statement 2018-05-15 15:02:24 +01:00
David Baker 7bfe84f8be Catch errors adding widget 2018-05-15 14:53:49 +01:00
David Baker e9336eab63 lint 2018-05-15 14:18:02 +01:00
David Baker d0ec467c34 Oops, actually get account data event.
Also ignore any account data events that aren;t widgets.
2018-05-15 14:13:56 +01:00
David Baker f4d69e26e9 PR feedback 2018-05-15 12:06:23 +01:00
David Baker 142ce4c256 better comment 2018-05-15 11:50:24 +01:00
David Baker 2956c049d6 Wait for echo from server when adding user widgets
As hopefully all explained in comments.

Fixes https://github.com/vector-im/riot-web/issues/6727
2018-05-15 11:41:16 +01:00
Richard Lewis 44ea11d386 Fix 'state_key' field name. 2018-05-09 16:55:49 +01:00
Richard Lewis 11915b0cdf Fix user widget event type.
Add comments for clarity.
2018-04-02 10:02:41 +01:00
Richard Lewis 9a3f3562e1 Wait for setAccountData to complete. 2018-03-29 20:07:26 +01:00
Richard Lewis 7d13edc67a Get user widgets by default (if roomID is not specified). 2018-03-13 11:58:18 +00:00
Richard Lewis a81269cba8 Check if user widget. 2018-03-13 10:07:27 +00:00
Richard Lewis a33859326e Use getUserWidgets where possible. 2018-03-09 09:15:16 +00:00
Richard Lewis ee4310cc41 Avoid potential NPE. 2018-02-25 21:47:23 +00:00
Richard Lewis b2bf4d4709 Merge branch 'develop' of https://github.com/matrix-org/matrix-react-sdk into rxl881/snapshot 2018-02-23 15:37:33 +00:00
Richard Lewis 46f94b3c5a Ensure that roomId is validated before accessing room-based widgets. 2018-02-23 14:53:52 +00:00
Matthew Hodgson 2d5a2a9d48 improve origin check of ScalarMessaging postmessage API.
ensures that https://scalar.ve can't access the API.
many thanks to @rugk for pointing out the potential vuln.
cc @rxl881 in case this bug has been transplanted elsewhere.
2018-02-17 00:02:38 +00:00
Richard Lewis 234ca8b062 Remove top padding from app tile. 2018-02-08 17:50:30 +00:00
Richard Lewis 393236ba34 Update / remove stickerpacks 2018-02-07 09:23:00 +00:00
Richard Lewis e508f06765 Add asset add / remove messaging clauses. 2018-02-05 11:50:25 +00:00
Richard Lewis 1a994b88f5 Move widget utility functions in to their own file. 2018-01-11 10:32:37 +00:00
Richard Lewis 9e9de765dc Handle user widgets. 2018-01-09 14:37:45 +00:00
Richard Lewis 60e7646f92 Save user widgets in accountData 2018-01-08 16:47:49 +00:00