From 1ae9103d78bf6f6d878972fb585a34bfbf93955d Mon Sep 17 00:00:00 2001 From: Matthew Hodgson Date: Wed, 1 Nov 2017 15:24:02 +0000 Subject: [PATCH] evil evil hack to temporarily hide avatar changes in status autojoin rooms --- src/shouldHideEvent.js | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/shouldHideEvent.js b/src/shouldHideEvent.js index 1501e28875..fbb0ee884e 100644 --- a/src/shouldHideEvent.js +++ b/src/shouldHideEvent.js @@ -41,6 +41,24 @@ export default function shouldHideEvent(ev, syncedSettings) { const eventDiff = memberEventDiff(ev); if (eventDiff.isMemberEvent) { + // XXX: horrific hack for Status until granular settings lands, where these + // can then be added into room state + if (['!YkNaCvrOXIQKPMhUHC:status.im', // #announcements:status.im + '!TSECabqXwnmkYVTfdX:status.im', // #general:status.im + '!FhCoxZbSjazJYFlCOY:status.im', // #dev-status:status.im + '!hHZWxpKcmFSjXcFHZC:status.im', // #news-articles:status.im + '!gIfSnanKtRcKDpUcmR:status.im', // #introductions:status.im + '!eGsKellGrAmpROBwXT:status.im', // #book-club:status.im + '!AqnfKJOcxeeuMOcqRL:status.im', // #music:status.im + ].includes(ev.getRoomId()) + && (/* eventDiff.isJoin || + eventDiff.isPart || + eventDiff.isDisplaynameChange || */ + eventDiff.isAvatarChange)) + { + return true; + } + if (syncedSettings['hideJoinLeaves'] && (eventDiff.isJoin || eventDiff.isPart)) return true; const isMemberAvatarDisplaynameChange = eventDiff.isAvatarChange || eventDiff.isDisplaynameChange; if (syncedSettings['hideAvatarDisplaynameChanges'] && isMemberAvatarDisplaynameChange) return true;