Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit fde6314

Browse files
authored
Merge pull request #1319 from matrix-org/rob/apps-not-e2ee
Note that apps are not E2EE
2 parents 388d814 + 38720e6 commit fde6314

File tree

3 files changed

+13
-1
lines changed

3 files changed

+13
-1
lines changed

src/components/views/elements/AppPermission.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,19 @@ export default class AppPermission extends React.Component {
4747
}
4848

4949
render() {
50+
let e2eWarningText;
51+
if (this.props.isRoomEncrypted) {
52+
e2eWarningText =
53+
<span className='mx_AppPermissionWarningTextLabel'>{_t('NOTE: Apps are not end-to-end encrypted')}</span>;
54+
}
5055
return (
5156
<div className='mx_AppPermissionWarning'>
5257
<div className='mx_AppPermissionWarningImage'>
5358
<img src='img/warning.svg' alt={_t('Warning!')}/>
5459
</div>
5560
<div className='mx_AppPermissionWarningText'>
56-
<span className='mx_AppPermissionWarningTextLabel'>Do you want to load widget from URL:</span> <span className='mx_AppPermissionWarningTextURL'>{this.state.curlBase}</span>
61+
<span className='mx_AppPermissionWarningTextLabel'>{_t('Do you want to load widget from URL:')}</span> <span className='mx_AppPermissionWarningTextURL'>{this.state.curlBase}</span>
62+
{e2eWarningText}
5763
</div>
5864
<input
5965
className='mx_AppPermissionButton'
@@ -67,9 +73,11 @@ export default class AppPermission extends React.Component {
6773
}
6874

6975
AppPermission.propTypes = {
76+
isRoomEncrypted: PropTypes.bool,
7077
url: PropTypes.string.isRequired,
7178
onPermissionGranted: PropTypes.func.isRequired,
7279
};
7380
AppPermission.defaultProps = {
81+
isRoomEncrypted: false,
7482
onPermissionGranted: function() {},
7583
};

src/components/views/elements/AppTile.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,9 +252,11 @@ export default React.createClass({
252252
);
253253
}
254254
} else {
255+
const isRoomEncrypted = MatrixClientPeg.get().isRoomEncrypted(this.props.room.roomId);
255256
appTileBody = (
256257
<div className="mx_AppTileBody">
257258
<AppPermission
259+
isRoomEncrypted={isRoomEncrypted}
258260
url={this.state.widgetUrl}
259261
onPermissionGranted={this._grantWidgetPermission}
260262
/>

src/i18n/strings/en_EN.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,7 @@
264264
"Disinvite": "Disinvite",
265265
"Display name": "Display name",
266266
"Displays action": "Displays action",
267+
"Do you want to load widget from URL:": "Do you want to load widget from URL:",
267268
"Don't send typing notifications": "Don't send typing notifications",
268269
"Download %(text)s": "Download %(text)s",
269270
"Drop File Here": "Drop File Here",
@@ -433,6 +434,7 @@
433434
"AM": "AM",
434435
"PM": "PM",
435436
"NOT verified": "NOT verified",
437+
"NOTE: Apps are not end-to-end encrypted": "NOTE: Apps are not end-to-end encrypted",
436438
"No devices with registered encryption keys": "No devices with registered encryption keys",
437439
"No display name": "No display name",
438440
"No more results": "No more results",

0 commit comments

Comments
 (0)