diff --git a/CHANGELOG.md b/CHANGELOG.md index 7102c43f24..870b42ecfc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,29 @@ +Changes in [0.9.1](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v0.9.1) (2017-06-02) +=================================================================================================== +[Full Changelog](https://github.com/matrix-org/matrix-react-sdk/compare/v0.9.0...v0.9.1) + + * Update from Weblate. + [\#1012](https://github.com/matrix-org/matrix-react-sdk/pull/1012) + * typo, missing import and mis-casing + [\#1014](https://github.com/matrix-org/matrix-react-sdk/pull/1014) + * Update from Weblate. + [\#1010](https://github.com/matrix-org/matrix-react-sdk/pull/1010) + +Changes in [0.9.0](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v0.9.0) (2017-06-02) +=================================================================================================== +[Full Changelog](https://github.com/matrix-org/matrix-react-sdk/compare/v0.9.0-rc.2...v0.9.0) + + * sync pt with pt_BR + [\#1009](https://github.com/matrix-org/matrix-react-sdk/pull/1009) + * Update from Weblate. + [\#1008](https://github.com/matrix-org/matrix-react-sdk/pull/1008) + * Update from Weblate. + [\#1003](https://github.com/matrix-org/matrix-react-sdk/pull/1003) + * allow hiding redactions, restoring old behaviour + [\#1004](https://github.com/matrix-org/matrix-react-sdk/pull/1004) + * Add missing translations + [\#1005](https://github.com/matrix-org/matrix-react-sdk/pull/1005) + Changes in [0.9.0-rc.2](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v0.9.0-rc.2) (2017-06-02) ============================================================================================================= [Full Changelog](https://github.com/matrix-org/matrix-react-sdk/compare/v0.9.0-rc.1...v0.9.0-rc.2) diff --git a/package.json b/package.json index 1b00a57d52..97e9426243 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "matrix-react-sdk", - "version": "0.9.0-rc.2", + "version": "0.9.1", "description": "SDK for matrix.org using React", "author": "matrix.org", "repository": { diff --git a/src/Analytics.js b/src/Analytics.js index 4f9ce6ad7d..c079011db7 100644 --- a/src/Analytics.js +++ b/src/Analytics.js @@ -19,8 +19,10 @@ import MatrixClientPeg from './MatrixClientPeg'; import PlatformPeg from './PlatformPeg'; import SdkConfig from './SdkConfig'; -function redact(str) { - return str.replace(/#\/(room|user)\/(.+)/, "#/$1/"); +function getRedactedUrl() { + const base = window.location.pathname.split('/').slice(-2).join('/'); + const redactedHash = window.location.hash.replace(/#\/(room|user)\/(.+)/, "#/$1/"); + return base + redactedHash; } const customVariables = { @@ -108,7 +110,7 @@ class Analytics { this.firstPage = false; return; } - this._paq.push(['setCustomUrl', redact(window.location.href)]); + this._paq.push(['setCustomUrl', getRedactedUrl()]); this._paq.push(['trackPageView']); } diff --git a/src/components/structures/MatrixChat.js b/src/components/structures/MatrixChat.js index afb3c57818..a9f8b9b708 100644 --- a/src/components/structures/MatrixChat.js +++ b/src/components/structures/MatrixChat.js @@ -39,7 +39,7 @@ import PageTypes from '../../PageTypes'; import createRoom from "../../createRoom"; import * as UDEHandler from '../../UnknownDeviceErrorHandler'; import KeyRequestHandler from '../../KeyRequestHandler'; -import { _t } from '../../languageHandler'; +import { _t, getCurrentLanguage } from '../../languageHandler'; module.exports = React.createClass({ displayName: 'MatrixChat', @@ -685,8 +685,12 @@ module.exports = React.createClass({ const roomToLeave = MatrixClientPeg.get().getRoom(roomId); Modal.createDialog(QuestionDialog, { - title: "Leave room", - description: Are you sure you want to leave the room {roomToLeave.name}?, + title: _t("Leave room"), + description: ( + + {_t("Are you sure you want to leave the room '%(roomName)s'?", {roomName: roomToLeave.name})} + + ), onFinished: (shouldLeave) => { if (shouldLeave) { const d = MatrixClientPeg.get().leave(roomId); @@ -792,7 +796,7 @@ module.exports = React.createClass({ this._teamToken = teamToken; dis.dispatch({action: 'view_home_page'}); } else if (this._is_registered) { - if (this.props.config.welcomeUserId) { + if (this.props.config.welcomeUserId && getCurrentLanguage().startsWith("en")) { createRoom({dmUserId: this.props.config.welcomeUserId}); return; } diff --git a/src/components/structures/MessagePanel.js b/src/components/structures/MessagePanel.js index 6f49e425fd..9251ff2bdb 100644 --- a/src/components/structures/MessagePanel.js +++ b/src/components/structures/MessagePanel.js @@ -90,6 +90,9 @@ module.exports = React.createClass({ // show timestamps always alwaysShowTimestamps: React.PropTypes.bool, + + // hide redacted events as per old behaviour + hideRedactions: React.PropTypes.bool, }, componentWillMount: function() { @@ -463,6 +466,8 @@ module.exports = React.createClass({ continuation = false; } + if (mxEv.isRedacted() && this.props.hideRedactions) return ret; + var eventId = mxEv.getId(); var highlight = (eventId == this.props.highlightedEventId); diff --git a/src/components/structures/TimelinePanel.js b/src/components/structures/TimelinePanel.js index 76004ebbac..aecb468f71 100644 --- a/src/components/structures/TimelinePanel.js +++ b/src/components/structures/TimelinePanel.js @@ -131,6 +131,8 @@ var TimelinePanel = React.createClass({ } } + const syncedSettings = UserSettingsStore.getSyncedSettings(); + return { events: [], timelineLoading: true, // track whether our room timeline is loading @@ -175,10 +177,13 @@ var TimelinePanel = React.createClass({ clientSyncState: MatrixClientPeg.get().getSyncState(), // should the event tiles have twelve hour times - isTwelveHour: UserSettingsStore.getSyncedSetting('showTwelveHourTimestamps'), + isTwelveHour: syncedSettings.showTwelveHourTimestamps, // always show timestamps on event tiles? - alwaysShowTimestamps: UserSettingsStore.getSyncedSetting('alwaysShowTimestamps'), + alwaysShowTimestamps: syncedSettings.alwaysShowTimestamps, + + // hide redacted events as per old behaviour + hideRedactions: syncedSettings.hideRedactions, }; }, @@ -915,7 +920,7 @@ var TimelinePanel = React.createClass({ }); }; } - var message = (error.errcode == 'M_FORBIDDEN') + var message = (error.errcode == 'M_FORBIDDEN') ? _t("Tried to load a specific point in this room's timeline, but you do not have permission to view the message in question") + "." : _t("Tried to load a specific point in this room's timeline, but was unable to find it") + "."; Modal.createDialog(ErrorDialog, { @@ -1113,26 +1118,27 @@ var TimelinePanel = React.createClass({ ); return (