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

allow hiding of notification body for privacy reasons #1362

Merged
merged 2 commits into from
Oct 14, 2017

Conversation

t3chguy
Copy link
Member

@t3chguy t3chguy commented Sep 6, 2017

Signed-off-by: Michael Telatynski 7t3chguy@gmail.com

for element-hq/element-web#3814

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
if (!global.localStorage) return true;
const enabled = global.localStorage.getItem('notifications_body_enabled');
// default to true if the popups are enabled
if (enabled === null) return this.isEnabled();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why this.isEnabled() here but true at the top? I'd probably just return the raw setting.

src/Notifier.js Outdated
) : null;
if (!this.isBodyEnabled()) {
msg = '';
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Surely blindly setting the message to the empty string is not what we want here? I'd have thought it should at least read 'message' (or 'image' etc)? Possibly even move some information from the title into the body, so it instead of, "Bob in The Room", "Message", it would be, "The Room", "Bob sent a message" or something.

Also, although I don't think you can turn notifications on for them in Riot, this would also break notifications for other events like joins/parts/room name changes etc.

@ara4n
Copy link
Member

ara4n commented Sep 17, 2017

@t3chguy you haz @dbkr feedback

@ara4n
Copy link
Member

ara4n commented Oct 14, 2017

i agree with dave's feedback, but it's better than nothing in the current form.

@ara4n ara4n merged commit a5c8d06 into develop Oct 14, 2017
@t3chguy t3chguy deleted the t3chguy/hide_notification_body branch October 29, 2017 17:23
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants