Commit Graph

103 Commits (d6d09227530da472ba5ecd9de99c32891ed9e82c)

Author SHA1 Message Date
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
Richard Lewis adebf71a1d Set user widgets on application data. 2018-01-08 15:38:01 +00:00
Richard Lewis b5f6d97fa2 Ignore postmessage requests with api field set. 2017-12-19 15:39:13 +00:00
Richard Lewis 597a71fa9d Add messaging endpoint for room encryption status. 2017-12-05 11:59:02 +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
Kegsay 5274cf59a0 Hook up the edit widget button (#1218)
* Hook up the edit widget button

* Review comments
2017-07-14 11:17:59 +01:00
Kegsay 6369253142 Scalar messaging: Add can_send_event operation (#1204)
This is mainly for use to pre-emptively show/hide buttons.
2017-07-11 15:20:33 +01:00
Kegsay cf158530f5 Implement new widget API (#1201)
* Implement new widget API

This allows clients to see who provisioned which widgets.

* Update to make state_key the wid

* Update to latest API

* Only show widgets which have required fields

* Don't constantly show apps dialog

* Fix example to include data key
2017-07-11 12:15:27 +01:00
Kegan Dougal f2d243443b Suppress more errors from spurious postMessage calls on the demo instance 2017-07-07 17:44:25 +01:00
Kegsay 11309f34e3 Reference count calls to start/stopListening on ScalarMessaging (#1164)
Otherwise component mounting/unmounting can race and you end up with nothing
listening.
2017-06-30 15:42:51 +01:00
Kegan Dougal 34d7d793b7 Handle M_NOT_FOUND 2017-06-09 15:06:09 +01:00
Kegan Dougal b70881f078 Rejig to support deletions better 2017-06-09 12:34:19 +01:00
Kegan Dougal 6d1d435247 Scalar: add in set_widget and get_widgets 2017-06-09 11:21:37 +01:00
Kegsay 5c1866c1c6 Add get_membership_count scalar API (#1043) 2017-06-06 16:41:08 +01:00
David Baker 43d8ccf128 Hopefully sort out strings with appended '.'s 2017-05-25 19:21:18 +01:00
David Baker 5c359e63ab Bulk change counterpart imports
to use languageHandler wrapper func
2017-05-25 11:39:08 +01:00
David Baker d419c42a4f Squash merge https://github.com/matrix-org/matrix-react-sdk/pull/801 2017-05-23 15:16:31 +01:00
David Baker 18d4d3392a Fix a bunch of linting errors
eslint --fix and a few manual ones
2017-01-20 14:22:27 +00:00
Luke Barnard ef1cb9530f Allow integration UI URLs with paths
The postMessage API assumed that event origins contained paths of their window origins, but they do not (https://developer.mozilla.org/en-US/docs/Web/API/Window/postMessage). This changes the origin check such that the integrations UI URL must start with the event origin.
2016-12-06 14:30:21 +00:00
Kegan Dougal 993bb5c89d Pass close_scalar postMessage action through to the dispatcher 2016-09-19 10:38:42 +01:00
Luke Barnard 514d667db2 Add ability to set plumbing state in a room
This takes the form:

The bridge will not create an admin room if there is plumbing state in the room of the form:

```JS
m.room.plumbing: {
    content: {
        status: "enabled"
    },
    ...
}
```
2016-09-15 15:24:08 +01:00
Kegan Dougal 9c290c4b8d Return after sending an error 2016-09-09 16:14:41 +01:00
Kegan Dougal a306a5e694 Fix bug whereby refreshing Vector would not allow querying of membership state
This was caused by Vector only sending a room alias with the `view_room` action.
We now resolve this to a room ID if we don't have a room ID.
2016-09-09 16:06:19 +01:00
Luke Barnard f605b172a7 Better log 2016-09-08 17:38:51 +01:00
Luke Barnard ce68a5bfc8 clean up 2016-09-07 17:08:02 +01:00
Luke Barnard 31d2a819f0 Get power levels before setting them 2016-09-07 17:06:57 +01:00
Luke Barnard 4bfa57b34e Getting join rules does not need user ID 2016-09-07 09:58:48 +01:00
Luke Barnard 3977ea0074 Add ability to set power level 2016-09-07 09:57:07 +01:00
Luke Barnard cb4df84d49 Missing curly bracket 2016-09-06 10:36:44 +01:00
Luke Barnard fa3387b326 Code review
- use an empty state key
- swap switch for if
- s/not in view/not visible/
2016-09-06 10:29:38 +01:00
Luke Barnard 310e6602ca Fix ref to dispatcher 2016-09-05 15:24:05 +01:00
Luke Barnard efccdab0ad Better error message for room not viewed 2016-09-05 15:16:22 +01:00
Luke Barnard 1c29c95990 Only current room works with postMessage 2016-09-05 15:13:48 +01:00
Luke Barnard 54f21c9acc Expose join rules of a room 2016-09-05 14:58:16 +01:00
Kegan Dougal c292312115 Send bot options with leading underscore on the state key
This is in order to get around the synapse rule which states that if the
state key is a user ID, then only that user can send the event. We want to
set the event for another user (the bot), hence we can't send just the plain
user ID.
2016-08-24 14:54:44 +01:00
Kegan Dougal 6235d88b55 Missing return 2016-08-24 14:10:21 +01:00
Kegan Dougal 73ba55abad s/then/done/ to throw uncaught exceptions if the error function throws 2016-08-24 13:47:35 +01:00
Kegan Dougal dbff5f671e Add ability to query and set bot options
- Also standardise on 'success' as the key name for successes.
- Also return the entire `content` on get state event requests.
2016-08-24 13:23:06 +01:00
Kegan Dougal ecc7850e13 Trailing ) 2016-08-23 14:50:52 +01:00
Kegan Dougal 1c649303e3 Consistency with sendResponse 2016-08-23 14:50:29 +01:00
Kegan Dougal e96a40004b Review comments 2016-08-23 14:41:47 +01:00
Kegan Dougal f6b008350d Spaces not tabs 2016-08-23 13:31:55 +01:00
Kegan Dougal 9162a0ff01 Add postMessage API required for integration provisioning
Supports querying member state and creating invites only.
2016-08-23 12:00:11 +01:00