From 6834083d8809a1632d6ea60c843d037ace5846ff Mon Sep 17 00:00:00 2001 From: RiotRobot Date: Wed, 31 Jul 2019 16:36:02 +0100 Subject: [PATCH 1/8] Upgrade to JS SDK 2.3.0-rc.1 --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index b4ec36dad7..ae76717b0a 100644 --- a/package.json +++ b/package.json @@ -84,7 +84,7 @@ "linkifyjs": "^2.1.6", "lodash": "^4.17.14", "lolex": "2.3.2", - "matrix-js-sdk": "2.2.0", + "matrix-js-sdk": "2.3.0-rc.1", "optimist": "^0.6.1", "pako": "^1.0.5", "png-chunks-extract": "^1.0.0", diff --git a/yarn.lock b/yarn.lock index 7d1ed378af..fc21dcffc2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4958,10 +4958,10 @@ mathml-tag-names@^2.0.1: resolved "https://registry.yarnpkg.com/mathml-tag-names/-/mathml-tag-names-2.1.1.tgz#6dff66c99d55ecf739ca53c492e626f1d12a33cc" integrity sha512-pWB896KPGSGkp1XtyzRBftpTzwSOL0Gfk0wLvxt4f2mgzjY19o0LxJ3U25vNWTzsh7da+KTbuXQoQ3lOJZ8WHw== -matrix-js-sdk@2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/matrix-js-sdk/-/matrix-js-sdk-2.2.0.tgz#c96a2caa4c92e5998443027579d7e76d4bcd4d21" - integrity sha512-gab7wuscgTKbXY5x136t9qSnDbOuq785ezd++NoFLEau0YjDos0YKolAm0TValUC9LY30CoVqqMfyPJ68CMezQ== +matrix-js-sdk@2.3.0-rc.1: + version "2.3.0-rc.1" + resolved "https://registry.yarnpkg.com/matrix-js-sdk/-/matrix-js-sdk-2.3.0-rc.1.tgz#fe90e3c60f17dacea6454786269a1ba497d8d401" + integrity sha512-lxk/aBNrTklG5Ya8vhc8kbBL2jrPU1vvDZ87GXVMGL3L1Cg3oNnClJXqyf/MwnY8egfqHWLrMsQRSerOPVgnEQ== dependencies: another-json "^0.2.0" babel-runtime "^6.26.0" From 7fd5fc00e3412ff6e0b7ee636084d10fcfe07069 Mon Sep 17 00:00:00 2001 From: RiotRobot Date: Wed, 31 Jul 2019 16:46:26 +0100 Subject: [PATCH 2/8] Prepare changelog for v1.5.0-rc.1 --- CHANGELOG.md | 95 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 95 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6a6c7979f9..6803f0352b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,98 @@ +Changes in [1.5.0-rc.1](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v1.5.0-rc.1) (2019-07-31) +============================================================================================================= +[Full Changelog](https://github.com/matrix-org/matrix-react-sdk/compare/v1.4.0...v1.5.0-rc.1) + + * Upgrade to JS SDK 2.3.0-rc.1 + * Update from Weblate + [\#3265](https://github.com/matrix-org/matrix-react-sdk/pull/3265) + * Replace React.PropTypes with usage of the `prop-types` package + [\#3263](https://github.com/matrix-org/matrix-react-sdk/pull/3263) + * strikethrough & underline deletions & insertions + [\#3264](https://github.com/matrix-org/matrix-react-sdk/pull/3264) + * Get rid of warning of required prop + [\#3261](https://github.com/matrix-org/matrix-react-sdk/pull/3261) + * Fix html diffs repeating text sometimes + [\#3262](https://github.com/matrix-org/matrix-react-sdk/pull/3262) + * Introduce RoomContext for sharing state between RoomView and children + [\#3260](https://github.com/matrix-org/matrix-react-sdk/pull/3260) + * Upgrade emojibase to fix :anxious: + [\#3259](https://github.com/matrix-org/matrix-react-sdk/pull/3259) + * Add support for IS v2 API with authentication + [\#3256](https://github.com/matrix-org/matrix-react-sdk/pull/3256) + * Fix autocomplete for editing being broken + [\#3258](https://github.com/matrix-org/matrix-react-sdk/pull/3258) + * Unit tests for new editor + [\#3247](https://github.com/matrix-org/matrix-react-sdk/pull/3247) + * Show MessageActionBar buttons conditionally on room state permissions + [\#3255](https://github.com/matrix-org/matrix-react-sdk/pull/3255) + * Handle onPaste AddressPickerDialog, allow addressing CSV/NL/Space delim list + [\#3249](https://github.com/matrix-org/matrix-react-sdk/pull/3249) + * Move history with alt up/down regardless of where selection is + [\#3254](https://github.com/matrix-org/matrix-react-sdk/pull/3254) + * Update from Weblate + [\#3253](https://github.com/matrix-org/matrix-react-sdk/pull/3253) + * Fix /rainbowme and /rainbow breaking apart utf-16 emoji + [\#3248](https://github.com/matrix-org/matrix-react-sdk/pull/3248) + * Tweak interactive tooltip buffer area allow for overshoot + [\#3245](https://github.com/matrix-org/matrix-react-sdk/pull/3245) + * Keep widget URL in permission screen to one line + [\#3243](https://github.com/matrix-org/matrix-react-sdk/pull/3243) + * Avoid visual glitch when terms appear for Integration Manager + [\#3242](https://github.com/matrix-org/matrix-react-sdk/pull/3242) + * Show diff for formatted messages in the edit history + [\#3244](https://github.com/matrix-org/matrix-react-sdk/pull/3244) + * Redirect paste to composer when event target can't receive input + [\#3239](https://github.com/matrix-org/matrix-react-sdk/pull/3239) + * Restore manual composing focusing logic + [\#3241](https://github.com/matrix-org/matrix-react-sdk/pull/3241) + * ToS for ISes/IMs: prompt on use screen + [\#3199](https://github.com/matrix-org/matrix-react-sdk/pull/3199) + * Defer IM token until widget is shown and permission granted + [\#3240](https://github.com/matrix-org/matrix-react-sdk/pull/3240) + * Move read marker past invisible events + [\#3226](https://github.com/matrix-org/matrix-react-sdk/pull/3226) + * Basic diff visualisation for plain text edits + [\#3238](https://github.com/matrix-org/matrix-react-sdk/pull/3238) + * Don't focus composer on keydown with modifier + [\#3237](https://github.com/matrix-org/matrix-react-sdk/pull/3237) + * Focus composer when typing anywhere in the app + [\#3224](https://github.com/matrix-org/matrix-react-sdk/pull/3224) + * Don't show remove button for original event in edit history + [\#3235](https://github.com/matrix-org/matrix-react-sdk/pull/3235) + * Remove feature flags for reactions and edits + [\#3233](https://github.com/matrix-org/matrix-react-sdk/pull/3233) + * Enable reactions and edits by default + [\#3229](https://github.com/matrix-org/matrix-react-sdk/pull/3229) + * Improve interactive tooltip safe mousing area + [\#3228](https://github.com/matrix-org/matrix-react-sdk/pull/3228) + * Add a previous event safe area around action bar + [\#3227](https://github.com/matrix-org/matrix-react-sdk/pull/3227) + * Parse integration manager origins more sensibly + [\#3217](https://github.com/matrix-org/matrix-react-sdk/pull/3217) + * ChatCreateOrReuse show only rooms both you and the other party still in + [\#3225](https://github.com/matrix-org/matrix-react-sdk/pull/3225) + * Check for liveliness on submission when the server was previously dead + [\#3218](https://github.com/matrix-org/matrix-react-sdk/pull/3218) + * Fix autocomplete delay text field not accepting text + [\#3219](https://github.com/matrix-org/matrix-react-sdk/pull/3219) + * Don't show a reason if there's no reason for a kick/ban + [\#3220](https://github.com/matrix-org/matrix-react-sdk/pull/3220) + * Take adjacent invisible events into account for read receipt, even if any + but first should be ignored. + [\#3221](https://github.com/matrix-org/matrix-react-sdk/pull/3221) + * Check content and content.users in power levels + [\#3216](https://github.com/matrix-org/matrix-react-sdk/pull/3216) + * Autojoin rooms when clicking the tombstone + [\#3206](https://github.com/matrix-org/matrix-react-sdk/pull/3206) + * Verify i18n in CI + [\#3209](https://github.com/matrix-org/matrix-react-sdk/pull/3209) + * Send the correct UIA alongside the wrong UIA for backwards comaptibility + [\#3211](https://github.com/matrix-org/matrix-react-sdk/pull/3211) + * Remove unused identityEnabled property from ValidatedServerConfig + [\#3213](https://github.com/matrix-org/matrix-react-sdk/pull/3213) + * Remove misleading text about admins logging people out from soft logout + [\#3205](https://github.com/matrix-org/matrix-react-sdk/pull/3205) + Changes in [1.4.0](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v1.4.0) (2019-07-18) =================================================================================================== [Full Changelog](https://github.com/matrix-org/matrix-react-sdk/compare/v1.4.0-rc.3...v1.4.0) From db43a81c0a71470129bceb202353832d33178e4d Mon Sep 17 00:00:00 2001 From: RiotRobot Date: Wed, 31 Jul 2019 16:46:26 +0100 Subject: [PATCH 3/8] v1.5.0-rc.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index ae76717b0a..a2fd07cd92 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "matrix-react-sdk", - "version": "1.4.0", + "version": "1.5.0-rc.1", "description": "SDK for matrix.org using React", "author": "matrix.org", "repository": { From da49dd4409c9d8c02c43ef2727fa87570546408c Mon Sep 17 00:00:00 2001 From: David Baker Date: Fri, 2 Aug 2019 11:22:42 +0100 Subject: [PATCH 4/8] Don't load guest sessions on post-registration login link If guest access was enabled, clicking the login link on the 'registration completed' page would just load the guest account you had before registering. Fixes https://github.com/vector-im/riot-web/issues/10482 --- src/Lifecycle.js | 12 ++++++++++-- src/components/structures/auth/Registration.js | 2 +- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/Lifecycle.js b/src/Lifecycle.js index fe7348e9c6..25914deefd 100644 --- a/src/Lifecycle.js +++ b/src/Lifecycle.js @@ -66,6 +66,9 @@ import TypingStore from "./stores/TypingStore"; * @params {string} opts.guestIsUrl: homeserver URL. Only used if enableGuest is * true; defines the IS to use. * + * @params {bool} opts.ignoreGuest: If the stored session is a guest account, ignore + * it and don't load it. + * * @returns {Promise} a promise which resolves when the above process completes. * Resolves to `true` if we ended up starting a session, or `false` if we * failed. @@ -96,7 +99,7 @@ export async function loadSession(opts) { guest: true, }, true).then(() => true); } - const success = await _restoreFromLocalStorage(); + const success = await _restoreFromLocalStorage(Boolean(opts.ignoreGuest)); if (success) { return true; } @@ -272,7 +275,7 @@ export function getLocalStorageSessionVars() { // The plan is to gradually move the localStorage access done here into // SessionStore to avoid bugs where the view becomes out-of-sync with // localStorage (e.g. isGuest etc.) -async function _restoreFromLocalStorage() { +async function _restoreFromLocalStorage(ignoreGuest) { if (!localStorage) { return false; } @@ -280,6 +283,11 @@ async function _restoreFromLocalStorage() { const {hsUrl, isUrl, accessToken, userId, deviceId, isGuest} = getLocalStorageSessionVars(); if (accessToken && userId && hsUrl) { + if (ignoreGuest && isGuest) { + console.log("Ignoring stored guest account: " + userId); + return false; + } + console.log(`Restoring session for ${userId}`); await _doSetLoggedIn({ userId: userId, diff --git a/src/components/structures/auth/Registration.js b/src/components/structures/auth/Registration.js index e825dd7034..fa390ace15 100644 --- a/src/components/structures/auth/Registration.js +++ b/src/components/structures/auth/Registration.js @@ -438,7 +438,7 @@ module.exports = React.createClass({ _onLoginClickWithCheck: async function(ev) { ev.preventDefault(); - const sessionLoaded = await Lifecycle.loadSession({}); + const sessionLoaded = await Lifecycle.loadSession({ignoreGuest: true}); if (!sessionLoaded) { // ok fine, there's still no session: really go to the login page this.props.onLoginClick(); From d4f0c38253b655e729727e2e07a0df1d386036a2 Mon Sep 17 00:00:00 2001 From: David Baker Date: Fri, 2 Aug 2019 16:44:49 +0100 Subject: [PATCH 5/8] Use options object --- src/Lifecycle.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/Lifecycle.js b/src/Lifecycle.js index 25914deefd..90911f813d 100644 --- a/src/Lifecycle.js +++ b/src/Lifecycle.js @@ -99,7 +99,9 @@ export async function loadSession(opts) { guest: true, }, true).then(() => true); } - const success = await _restoreFromLocalStorage(Boolean(opts.ignoreGuest)); + const success = await _restoreFromLocalStorage({ + ignoreGuest: Boolean(opts.ignoreGuest), + }); if (success) { return true; } @@ -275,7 +277,9 @@ export function getLocalStorageSessionVars() { // The plan is to gradually move the localStorage access done here into // SessionStore to avoid bugs where the view becomes out-of-sync with // localStorage (e.g. isGuest etc.) -async function _restoreFromLocalStorage(ignoreGuest) { +async function _restoreFromLocalStorage(opts) { + const ignoreGuest = opts.ignoreGuest; + if (!localStorage) { return false; } From ec9be798aea28f4687dad504a24568647c39f574 Mon Sep 17 00:00:00 2001 From: RiotRobot Date: Mon, 5 Aug 2019 11:58:25 +0100 Subject: [PATCH 6/8] released js-sdk --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index a2fd07cd92..4966048199 100644 --- a/package.json +++ b/package.json @@ -84,7 +84,7 @@ "linkifyjs": "^2.1.6", "lodash": "^4.17.14", "lolex": "2.3.2", - "matrix-js-sdk": "2.3.0-rc.1", + "matrix-js-sdk": "2.3.0", "optimist": "^0.6.1", "pako": "^1.0.5", "png-chunks-extract": "^1.0.0", diff --git a/yarn.lock b/yarn.lock index fc21dcffc2..5935a4342c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4958,10 +4958,10 @@ mathml-tag-names@^2.0.1: resolved "https://registry.yarnpkg.com/mathml-tag-names/-/mathml-tag-names-2.1.1.tgz#6dff66c99d55ecf739ca53c492e626f1d12a33cc" integrity sha512-pWB896KPGSGkp1XtyzRBftpTzwSOL0Gfk0wLvxt4f2mgzjY19o0LxJ3U25vNWTzsh7da+KTbuXQoQ3lOJZ8WHw== -matrix-js-sdk@2.3.0-rc.1: - version "2.3.0-rc.1" - resolved "https://registry.yarnpkg.com/matrix-js-sdk/-/matrix-js-sdk-2.3.0-rc.1.tgz#fe90e3c60f17dacea6454786269a1ba497d8d401" - integrity sha512-lxk/aBNrTklG5Ya8vhc8kbBL2jrPU1vvDZ87GXVMGL3L1Cg3oNnClJXqyf/MwnY8egfqHWLrMsQRSerOPVgnEQ== +matrix-js-sdk@2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/matrix-js-sdk/-/matrix-js-sdk-2.3.0.tgz#ed04172add2e31c532dc87e2f38c26c2a63191c6" + integrity sha512-jeswie7cWK7+XxcD+pQ7LplWnWkOQDa+x6y7FUUnxCdEvaj38cE5Obo9bPMjFgOln2hISlLdR8fzMNE9F4oUJA== dependencies: another-json "^0.2.0" babel-runtime "^6.26.0" From 1682f3a6ba63a735b434674059e664e02a0983bf Mon Sep 17 00:00:00 2001 From: RiotRobot Date: Mon, 5 Aug 2019 12:01:29 +0100 Subject: [PATCH 7/8] Prepare changelog for v1.5.0 --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6803f0352b..10fd56ec56 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +Changes in [1.5.0](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v1.5.0) (2019-08-05) +=================================================================================================== +[Full Changelog](https://github.com/matrix-org/matrix-react-sdk/compare/v1.5.0-rc.1...v1.5.0) + + * Don't load guest sessions on post-registration login link + [\#3277](https://github.com/matrix-org/matrix-react-sdk/pull/3277) + Changes in [1.5.0-rc.1](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v1.5.0-rc.1) (2019-07-31) ============================================================================================================= [Full Changelog](https://github.com/matrix-org/matrix-react-sdk/compare/v1.4.0...v1.5.0-rc.1) From fbd2ba8863aef5f3d3a010ad91148d5f7be95f1e Mon Sep 17 00:00:00 2001 From: RiotRobot Date: Mon, 5 Aug 2019 12:01:29 +0100 Subject: [PATCH 8/8] v1.5.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 4966048199..f4f768d7cb 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "matrix-react-sdk", - "version": "1.5.0-rc.1", + "version": "1.5.0", "description": "SDK for matrix.org using React", "author": "matrix.org", "repository": {