From 46a8ec903eb295ed2dda75c24e4dd1000dfa573e Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Wed, 26 Jun 2019 20:22:01 +0100 Subject: [PATCH] Handle null-rejoins only if SettingsStore says so Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- src/TextForEvent.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/TextForEvent.js b/src/TextForEvent.js index a10cea61ea..e3c65e7d08 100644 --- a/src/TextForEvent.js +++ b/src/TextForEvent.js @@ -18,6 +18,7 @@ import CallHandler from './CallHandler'; import { _t } from './languageHandler'; import * as Roles from './Roles'; import {isValid3pidInvite} from "./RoomInvite"; +import SettingsStore from "./settings/SettingsStore"; function textForMemberEvent(ev) { // XXX: SYJS-16 "sender is sometimes null for join messages" @@ -74,9 +75,11 @@ function textForMemberEvent(ev) { return _t('%(senderName)s changed their profile picture.', {senderName}); } else if (!prevContent.avatar_url && content.avatar_url) { return _t('%(senderName)s set a profile picture.', {senderName}); - } else { + } else if (SettingsStore.getValue("showHiddenEventsInTimeline")) { // This is a null rejoin, it will only be visible if the Labs option is enabled return _t("%(senderName)s made no change.", {senderName}); + } else { + return ""; } } else { if (!ev.target) console.warn("Join message has no target! -- " + ev.getContent().state_key);