From 26269986f512c015754c2c1863b31491b6e57ffc Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Sun, 19 Nov 2017 15:36:28 +0000 Subject: [PATCH 1/2] move piwik whitelists to conf and add piwik config.json info to readme Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- README.md | 5 +++++ config.sample.json | 2 ++ 2 files changed, 7 insertions(+) diff --git a/README.md b/README.md index 1da2063212..273f448b29 100644 --- a/README.md +++ b/README.md @@ -130,6 +130,11 @@ You can configure the app by copying `config.sample.json` to anything else since it is used to isolate the privileges of file attachments to this domain. Default: `usercontent.riot.im`. This needs to contain v1.html from https://github.com/matrix-org/usercontent/blob/master/v1.html +1. `piwik`: an object containing the following properties: + 1. `url`: The URL of the Piwik instance to use for collecting Analytics + 1. `whitelistedHSUrls`: a list of HS URLs to not redact from the Analytics + 1. `whitelistedISUrls`: a list of IS URLs to not redact from the Analytics + 1. `siteId`: The Piwik Site ID to use when sending Analytics to the Piwik server configured above Running as a Desktop app ======================== diff --git a/config.sample.json b/config.sample.json index 016517cd2c..6e83cec2d1 100644 --- a/config.sample.json +++ b/config.sample.json @@ -24,6 +24,8 @@ "welcomeUserId": "@riot-bot:matrix.org", "piwik": { "url": "https://piwik.riot.im/", + "whitelistedHSUrls": ["https://matrix.org"], + "whitelistedISUrls": ["https://vector.im", "https://matrix.org"], "siteId": 1 } } From f7a26ddb915143918e93a0fea89a0b7d0394355d Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Sun, 19 Nov 2017 20:46:40 +0000 Subject: [PATCH 2/2] fix (race?) broken tests Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- test/app-tests/joining.js | 5 +++++ test/app-tests/loading.js | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/test/app-tests/joining.js b/test/app-tests/joining.js index 29da3413b3..fc380e7d58 100644 --- a/test/app-tests/joining.js +++ b/test/app-tests/joining.js @@ -16,6 +16,9 @@ limitations under the License. /* joining.js: tests for the various paths when joining a room */ +import PlatformPeg from 'matrix-react-sdk/lib/PlatformPeg'; +import Platform from '../../src/vector/platform'; + require('skin-sdk'); var jssdk = require('matrix-js-sdk'); @@ -85,6 +88,8 @@ describe('joining a room', function () { localStorage.setItem("mx_access_token", ACCESS_TOKEN ); localStorage.setItem("mx_user_id", USER_ID); + PlatformPeg.set(new Platform()); + var mc = ( {throw new Error("unimplemented");}} diff --git a/test/app-tests/loading.js b/test/app-tests/loading.js index a7e7c9851b..dab616577a 100644 --- a/test/app-tests/loading.js +++ b/test/app-tests/loading.js @@ -16,6 +16,9 @@ limitations under the License. /* loading.js: test the myriad paths we have for loading the application */ +import PlatformPeg from 'matrix-react-sdk/lib/PlatformPeg'; +import Platform from '../../src/vector/platform'; + import 'skin-sdk'; import React from 'react'; @@ -137,6 +140,8 @@ describe('loading:', function () { default_is_url: DEFAULT_IS_URL, }, opts.config || {}); + PlatformPeg.set(new Platform()); + var params = parseQs(windowLocation); matrixChat = ReactDOM.render(