Don't send read receipt if user has logged out
This commit is contained in:
parent
f56aff7cb9
commit
e5a770a373
1 changed files with 4 additions and 0 deletions
|
@ -431,6 +431,10 @@ var TimelinePanel = React.createClass({
|
||||||
sendReadReceipt: function() {
|
sendReadReceipt: function() {
|
||||||
if (!this.refs.messagePanel) return;
|
if (!this.refs.messagePanel) return;
|
||||||
if (!this.props.manageReadReceipts) return;
|
if (!this.props.manageReadReceipts) return;
|
||||||
|
// This happens on user_activity_end which is delayed, and it's
|
||||||
|
// very possible have logged out within that timeframe, so check
|
||||||
|
// we still have a client.
|
||||||
|
if (!MatrixClientPeg.get()) return;
|
||||||
|
|
||||||
// if we are scrolled to the bottom, do a quick-reset of our unreadNotificationCount
|
// if we are scrolled to the bottom, do a quick-reset of our unreadNotificationCount
|
||||||
// to avoid having to wait from the remote echo from the homeserver.
|
// to avoid having to wait from the remote echo from the homeserver.
|
||||||
|
|
Loading…
Reference in a new issue