bug fix in display of online topic subscribers

This commit is contained in:
or-else
2018-02-12 15:04:33 -08:00
parent 576d81a7ec
commit 1415f21c51
+4 -2
View File
@@ -2696,7 +2696,8 @@
} }
if (this.props.connected && !props.connected) { if (this.props.connected && !props.connected) {
// connection lost, do nothing // connection lost, clear online subs
this.setState({onlineSubs: []});
return; return;
} }
@@ -2717,8 +2718,9 @@
this.leave(); this.leave();
this.handleDescChange(topic); this.handleDescChange(topic);
var myId = this.props.myUserId;
topic.subscribers(function(sub) { topic.subscribers(function(sub) {
if (sub.online) { if (sub.online && sub.user != myId) {
subs.push(sub); subs.push(sub);
} }
}); });