Skip to content

Commit

Permalink
Add option to not send read receipts.
Browse files Browse the repository at this point in the history
Addresses element-hq/element-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 <travpc@gmail.com>
  • Loading branch information
turt2live committed Apr 21, 2017
1 parent ae8d04b commit 1bdae49
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/components/structures/TimelinePanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ var ObjectUtils = require('../../ObjectUtils');
var Modal = require("../../Modal");
var UserActivity = require("../../UserActivity");
var KeyCode = require('../../KeyCode');
import * as UserSettingsStore from "../../UserSettingsStore";

var PAGINATE_SIZE = 20;
var INITIAL_SIZE = 20;
Expand Down Expand Up @@ -494,6 +495,7 @@ var TimelinePanel = React.createClass({
// very possible have logged out within that timeframe, so check
// we still have a client.
if (!MatrixClientPeg.get()) return;
if (UserSettingsStore.getSyncedSetting('dontSendReadReceipts', false)) return;

var currentReadUpToEventId = this._getCurrentReadReceipt(true);
var currentReadUpToEventIndex = this._indexForEventId(currentReadUpToEventId);
Expand Down
4 changes: 4 additions & 0 deletions src/components/structures/UserSettings.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ const SETTINGS_LABELS = [
id: 'autoplayGifsAndVideos',
label: 'Autoplay GIFs and videos',
},
{
id: 'dontSendReadReceipts',
label: "Don't send read receipts"
},
/*
{
id: 'alwaysShowTimestamps',
Expand Down

0 comments on commit 1bdae49

Please sign in to comment.