Skip to content

Commit 2667ed2

Browse files
authored
Merge pull request element-hq#4988 from vector-im/t3chguy/hide_notification_body
allow hiding of notification body for privacy reasons
2 parents 5bb2992 + fca86be commit 2667ed2

2 files changed

Lines changed: 21 additions & 0 deletions

File tree

‎src/components/views/settings/Notifications.js‎

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,11 @@ module.exports = React.createClass({
116116
UserSettingsStore.setEnableNotifications(event.target.checked);
117117
},
118118

119+
onEnableDesktopNotificationBodyChange: function(event) {
120+
UserSettingsStore.setEnableNotificationBody(event.target.checked);
121+
this.forceUpdate();
122+
},
123+
119124
onEnableEmailNotificationsChange: function(address, event) {
120125
var emailPusherPromise;
121126
if (event.target.checked) {
@@ -831,6 +836,21 @@ module.exports = React.createClass({
831836
</div>
832837
</div>
833838

839+
<div className="mx_UserNotifSettings_tableRow">
840+
<div className="mx_UserNotifSettings_inputCell">
841+
<input id="enableDesktopNotificationBody"
842+
ref="enableDesktopNotificationBody"
843+
type="checkbox"
844+
checked={ UserSettingsStore.getEnableNotificationBody() }
845+
onChange={ this.onEnableDesktopNotificationBodyChange } />
846+
</div>
847+
<div className="mx_UserNotifSettings_labelCell">
848+
<label htmlFor="enableDesktopNotificationBody">
849+
{ _t('Show message in desktop notification') }
850+
</label>
851+
</div>
852+
</div>
853+
834854
<div className="mx_UserNotifSettings_tableRow">
835855
<div className="mx_UserNotifSettings_inputCell">
836856
<input id="enableDesktopAudioNotifications"

‎src/i18n/strings/en_EN.json‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
"Download this file": "Download this file",
3434
"Enable audible notifications in web client": "Enable audible notifications in web client",
3535
"Enable desktop notifications": "Enable desktop notifications",
36+
"Show message in desktop notification": "Show message in desktop notification",
3637
"Enable email notifications": "Enable email notifications",
3738
"Enable notifications for this account": "Enable notifications for this account",
3839
"Enable them now": "Enable them now",

0 commit comments

Comments
 (0)