Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit bb2f4fb

Browse files
Check for the spec version when determining private read receipt support (#9341)
Co-authored-by: Travis Ralston <[email protected]>
1 parent ff59f68 commit bb2f4fb

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/components/structures/TimelinePanel.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -994,7 +994,8 @@ class TimelinePanel extends React.Component<IProps, IState> {
994994
if (e.errcode === 'M_UNRECOGNIZED' && lastReadEvent) {
995995
if (
996996
!sendRRs
997-
&& !cli.doesServerSupportUnstableFeature("org.matrix.msc2285.stable")
997+
&& !(await cli.doesServerSupportUnstableFeature("org.matrix.msc2285.stable"))
998+
&& !(await cli.isVersionSupported("v1.4"))
998999
) return;
9991000
try {
10001001
return await cli.sendReadReceipt(

src/components/views/settings/tabs/user/PreferencesUserSettingsTab.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,9 +125,12 @@ export default class PreferencesUserSettingsTab extends React.Component<IProps,
125125
}
126126

127127
public async componentDidMount(): Promise<void> {
128+
const cli = MatrixClientPeg.get();
129+
128130
this.setState({
129131
disablingReadReceiptsSupported: (
130-
await MatrixClientPeg.get().doesServerSupportUnstableFeature("org.matrix.msc2285.stable")
132+
(await cli.doesServerSupportUnstableFeature("org.matrix.msc2285.stable"))
133+
|| (await cli.isVersionSupported("v1.4"))
131134
),
132135
});
133136
}

0 commit comments

Comments
 (0)