From 75f06cd65a6344234e3388e7a7014803c7a16397 Mon Sep 17 00:00:00 2001 From: turt2live Date: Fri, 21 Apr 2017 14:40:46 -0600 Subject: [PATCH] Add option to not send read receipts. Addresses vector-im/riot-web#2527. The side effect of this is that notifications remain stuck. Because the RR isn't sent, the unread notification stays on the client. This also ends up affecting riot-android, and likely riot-ios. Signed-off-by: Travis Ralston --- src/components/structures/TimelinePanel.js | 1 + src/components/structures/UserSettings.js | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/src/components/structures/TimelinePanel.js b/src/components/structures/TimelinePanel.js index 76004ebbac08..0e610047c69e 100644 --- a/src/components/structures/TimelinePanel.js +++ b/src/components/structures/TimelinePanel.js @@ -514,6 +514,7 @@ var TimelinePanel = React.createClass({ const cli = MatrixClientPeg.get(); // if no client or client is guest don't send RR or RM if (!cli || cli.isGuest()) return; + if (UserSettingsStore.getSyncedSetting('dontSendReadReceipts', false)) return; let shouldSendRR = true; diff --git a/src/components/structures/UserSettings.js b/src/components/structures/UserSettings.js index 101ec2c37869..434f4fdb6f29 100644 --- a/src/components/structures/UserSettings.js +++ b/src/components/structures/UserSettings.js @@ -63,6 +63,10 @@ const SETTINGS_LABELS = [ id: 'autoplayGifsAndVideos', label: 'Autoplay GIFs and videos', }, + { + id: 'dontSendReadReceipts', + label: "Don't send read receipts" + }, { id: 'hideReadReceipts', label: 'Hide read receipts',