Attempts to prevent ghost contacts from appearing in the contact list.
This commit is contained in:
parent
63dd6df217
commit
5af92474c3
1
app.js
1
app.js
|
@ -824,6 +824,7 @@ $(document).bind('left.muc', function (event, jid) {
|
||||||
var container = document.getElementById(
|
var container = document.getElementById(
|
||||||
'participant_' + Strophe.getResourceFromJid(jid));
|
'participant_' + Strophe.getResourceFromJid(jid));
|
||||||
if (container) {
|
if (container) {
|
||||||
|
ContactList.removeContact(jid);
|
||||||
VideoLayout.removeConnectionIndicator(jid);
|
VideoLayout.removeConnectionIndicator(jid);
|
||||||
// hide here, wait for video to close before removing
|
// hide here, wait for video to close before removing
|
||||||
$(container).hide();
|
$(container).hide();
|
||||||
|
|
|
@ -535,8 +535,21 @@ var VideoLayout = (function (my) {
|
||||||
VideoLayout.removeRemoteStreamElement(
|
VideoLayout.removeRemoteStreamElement(
|
||||||
stream, isVideo, container);
|
stream, isVideo, container);
|
||||||
|
|
||||||
if (peerJid)
|
// NOTE(gp) it seems that under certain circumstances, the
|
||||||
ContactList.removeContact(peerJid);
|
// onended event is not fired and thus the contact list is not
|
||||||
|
// updated.
|
||||||
|
//
|
||||||
|
// The onended event of a stream should be fired when the SSRCs
|
||||||
|
// corresponding to that stream are removed from the SDP; but
|
||||||
|
// this doesn't seem to always be the case, resulting in ghost
|
||||||
|
// contacts.
|
||||||
|
//
|
||||||
|
// In an attempt to fix the ghost contacts problem, I'm moving
|
||||||
|
// the removeContact() method call in app.js, inside the
|
||||||
|
// 'muc.left' event handler.
|
||||||
|
|
||||||
|
//if (peerJid)
|
||||||
|
// ContactList.removeContact(peerJid);
|
||||||
};
|
};
|
||||||
|
|
||||||
// Add click handler.
|
// Add click handler.
|
||||||
|
|
Loading…
Reference in New Issue