diff --git a/src/components/structures/TimelinePanel.js b/src/components/structures/TimelinePanel.js
index cdeea78204..44569569b6 100644
--- a/src/components/structures/TimelinePanel.js
+++ b/src/components/structures/TimelinePanel.js
@@ -685,20 +685,25 @@ const TimelinePanel = createReactClass({
}
this.lastRMSentEventId = this.state.readMarkerEventId;
+ const hiddenRR = !SettingsStore.getValue("sendReadReceipts");
+
debuglog('TimelinePanel: Sending Read Markers for ',
this.props.timelineSet.room.roomId,
'rm', this.state.readMarkerEventId,
lastReadEvent ? 'rr ' + lastReadEvent.getId() : '',
+ ' hidden:' + hiddenRR,
);
MatrixClientPeg.get().setRoomReadMarkers(
this.props.timelineSet.room.roomId,
this.state.readMarkerEventId,
lastReadEvent, // Could be null, in which case no RR is sent
+ {hidden: hiddenRR},
).catch((e) => {
// /read_markers API is not implemented on this HS, fallback to just RR
if (e.errcode === 'M_UNRECOGNIZED' && lastReadEvent) {
return MatrixClientPeg.get().sendReadReceipt(
lastReadEvent,
+ {hidden: hiddenRR},
).catch((e) => {
console.error(e);
this.lastRRSentEventId = undefined;
diff --git a/src/components/views/settings/tabs/user/LabsUserSettingsTab.js b/src/components/views/settings/tabs/user/LabsUserSettingsTab.js
index 9c2d49a8bf..07a2bf722a 100644
--- a/src/components/views/settings/tabs/user/LabsUserSettingsTab.js
+++ b/src/components/views/settings/tabs/user/LabsUserSettingsTab.js
@@ -54,6 +54,7 @@ export default class LabsUserSettingsTab extends React.Component {
+
);
diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json
index dd0894b813..acccade834 100644
--- a/src/i18n/strings/en_EN.json
+++ b/src/i18n/strings/en_EN.json
@@ -367,6 +367,7 @@
"Show hidden events in timeline": "Show hidden events in timeline",
"Low bandwidth mode": "Low bandwidth mode",
"Allow fallback call assist server turn.matrix.org when your homeserver does not offer one (your IP address would be shared during a call)": "Allow fallback call assist server turn.matrix.org when your homeserver does not offer one (your IP address would be shared during a call)",
+ "Send read receipts for messages (requires compatible homeserver to disable)": "Send read receipts for messages (requires compatible homeserver to disable)",
"Collecting app version information": "Collecting app version information",
"Collecting logs": "Collecting logs",
"Uploading report": "Uploading report",
diff --git a/src/settings/Settings.js b/src/settings/Settings.js
index 70abf406b8..f86a8566c6 100644
--- a/src/settings/Settings.js
+++ b/src/settings/Settings.js
@@ -394,4 +394,11 @@ export const SETTINGS = {
// This is a tri-state value, where `null` means "prompt the user".
default: null,
},
+ "sendReadReceipts": {
+ supportedLevels: LEVELS_ACCOUNT_SETTINGS,
+ displayName: _td(
+ "Send read receipts for messages (requires compatible homeserver to disable)",
+ ),
+ default: true,
+ },
};