You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-07-28 15:22:05 +03:00
If new RR-RM API not implemented, fallback to RR-only API
This commit is contained in:
@ -536,9 +536,16 @@ var TimelinePanel = React.createClass({
|
|||||||
this.props.timelineSet.room.roomId,
|
this.props.timelineSet.room.roomId,
|
||||||
this.state.readMarkerEventId,
|
this.state.readMarkerEventId,
|
||||||
lastReadEvent
|
lastReadEvent
|
||||||
).catch(() => {
|
).catch((e) => {
|
||||||
|
// /read_markers API is not implemented on this HS, fallback to just RR
|
||||||
|
if (e.errcode === 'M_UNRECOGNIZED') {
|
||||||
|
return MatrixClientPeg.get().sendReadReceipt(
|
||||||
|
lastReadEvent
|
||||||
|
).catch(() => {
|
||||||
|
this.last_rr_sent_event_id = undefined;
|
||||||
|
});
|
||||||
|
}
|
||||||
// it failed, so allow retries next time the user is active
|
// it failed, so allow retries next time the user is active
|
||||||
this.last_rr_sent_event_id = undefined;
|
|
||||||
this.last_rm_sent_event_id = undefined;
|
this.last_rm_sent_event_id = undefined;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user