Commit Graph

35 Commits (7d7878245bb93789ece48806cbc43f2edb9480e5)

Author SHA1 Message Date
David Baker 7d7878245b Strip path component from IM rest url
before passing to js-sdk. We continue to use the full URL for the
calls done by matrix-react-sdk, but the standard terms API called
by the js-sdk lives on the standard _matrix path. This means we
don't support running IMs on a non-root path, but it's the only
realistic way of transitioning to _matrix paths since configs in
the wild contain bits of the API path.

Once we've fully transitioned to _matrix URLs, we can give people
a grace period to update their configs, then use the rest url as
a regular base url.
2019-07-22 18:54:04 +01:00
David Baker 7c43f0bcef Don't retry on terms error 2019-07-15 14:05:39 +01:00
David Baker 69fa34d71f Fix ScalarAuthClient to refresh tokens if they fail
Also add a test to make sure it does it
2019-07-11 16:00:24 +01:00
David Baker 189dd4c7b1 SERVICE_TYPES 2019-07-10 12:08:26 +01:00
David Baker 54aaabac74 Initial support for ToS dialogs for IS/IM
as per MSC2140
2019-07-09 18:51:56 +01:00
David Baker 7d40ccfdbe De-lint ScalarAuthClient 2019-07-04 12:59:20 +01:00
Travis Ralston a5f296457f Make the Manage Integrations Button defer scalar auth to the manager
This moves the responsibility of creating a URL to open from the button (and other components) to the integrations manager dialog itself.

By doing this, we also cut down on scalar API calls because we don't pick up on account information until the user opens the dialog.
2019-06-17 15:29:28 -06:00
Jason Robinson 2aba18faaf Add versioning to integration manager API /register and /account calls
Current used version will be 1.1.

Signed-off-by: Jason Robinson <jasonr@matrix.org>
2019-03-13 12:39:47 +02:00
Aaron Raimist 49ce4ef117
eslint --fix src/
Signed-off-by: Aaron Raimist <aaron@raim.ist>
2018-10-26 22:50:38 -05:00
Aaron Raimist 58488c076e
Fix more lint errors
Signed-off-by: Aaron Raimist <aaron@raim.ist>
2018-10-11 21:54:55 -05:00
Aaron Raimist ef3d1a611a
Fix Promise.defer warning in ScalarAuthClient.js
Signed-off-by: Aaron Raimist <aaron@raim.ist>
2018-10-01 19:57:27 -05:00
Richard Lewis 20a442c962 Add comment. 2018-02-25 23:00:46 +00:00
Richard Lewis 86461bc88f Disable all widget assets on widget removal. 2018-02-24 00:10:28 +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 9e3c1fbc7a Pass room name. 2018-02-09 11:44:27 +00:00
David Baker 84da19c544
Merge pull request #1668 from turt2live/travis/re-register-scalar-token
Attempt to re-register for a scalar token if ours is invalid
2018-01-11 11:01:04 +00:00
Travis Ralston 678d87ef20 Give the current theme to the integration manager
For integration managers which would like to theme themselves to match Riot.

Signed-off-by: Travis Ralston <travpc@gmail.com>
2017-12-16 20:13:27 -07:00
Travis Ralston dca6fb6b81 Attempt to re-register for a scalar token if ours is invalid
This mostly helps with people migrating between integration managers where their old scalar token may no longer be valid. This also solves the problem of people switching between scalar and scalar-staging in the wild.

Signed-off-by: Travis Ralston <travpc@gmail.com>
2017-12-16 20:04:32 -07:00
Richard Lewis 24db57bfb6 Fix api prefix. 2017-12-08 18:47:00 +00:00
Richard Lewis d62520482a fix typo. 2017-12-05 21:57:28 +00:00
Richard Lewis fc3287c49f Fix error message. 2017-12-05 21:56:35 +00:00
Richard Lewis d5d5397959 Set custom widget title. 2017-12-05 21:41:44 +00:00
Luke Barnard d3f9a3aeb5 Run eslint --fix
Fixing 1000s of lint issues. Some rules cannot be `--fix`ed but this goes some way to linting the entire codebase.
2017-10-11 17:56:17 +01:00
Richard Lewis 74ab7c9bb3 Fix encoding 2017-08-22 09:59:27 +01:00
Matthew Hodgson d7f5295949 untested WIP for supporting multiple widgets properly 2017-08-18 18:40:00 +01:00
Richard van der Hoff 0d7cc59d99 replace q method calls with bluebird ones
```
find src test -name '*.js' |
    xargs perl -i -pe 's/q\.(all|defer|reject|delay|try|isFulfilled)\(/Promise.$1(/'
```
2017-07-12 18:05:40 +01:00
Richard van der Hoff 0254d2b3a2 q(...) -> Promise.resolve
```
find src test -name '*.js' | xargs perl -i -pe 's/\b[qQ]\(/Promise.resolve(/'
```
2017-07-12 18:05:08 +01:00
Richard van der Hoff a06bd84213 replace imports of `q` with bluebird
update `package.json`

```
find src test -name '*.js' |
   xargs perl -i -pe 'if (/require\(.[qQ].\)/) { $_ = "import Promise from '\''bluebird'\'';\n"; }'

find src test -name '*.js' |
   xargs perl -i -pe 'if (/import [qQ]/) { $_ = "import Promise from '\''bluebird'\'';\n"; }'
```
2017-07-12 18:05:08 +01:00
Richard Lewis d091550ccb Use app ID for element key and pass screen parameter to scalar. 2017-07-06 15:59:59 +01:00
Kegan Dougal 45ada1887d Implement starter link support
This involves modal dialogs because browsers are *terrible*.
2016-09-02 16:36:43 +01:00
Kegan Dougal 6ec7e5df28 Move scalar auth stuff to ScalarAuthClient from RoomSettings 2016-09-02 16:03:24 +01:00
Luke Barnard 46d306a217 Change register response access_token to scalar_token 2016-08-17 17:16:19 +01:00
David Baker 15dccd9871 Handle errors with scalar-oauthing
Handle error getting the scalar token and check for non-success status codes in the response handler (because apparently browser-request doesn't consider that an error).
2016-06-06 17:55:45 +01:00
David Baker bb9316edfa Pass the room id to scalar 2016-05-06 14:42:00 +01:00
David Baker 6da4b9d671 Add suport for showing the scalar UI 2016-05-06 14:19:56 +01:00