bugfix
This commit is contained in:
parent
bc1b52d5de
commit
938b6fa850
@ -77,11 +77,16 @@ bricks.Signaling = class {
|
||||
this.sessionhandlers[sessiontype] = handler;
|
||||
}
|
||||
async recvdata_handler(data){
|
||||
if (data.type == 'login'){
|
||||
this.peers[data.msgfrom.id] = data.msgfrom;
|
||||
if (data.type == 'online'){
|
||||
data.online.forEach(p => {
|
||||
var d = self.peers[p.id];
|
||||
if (!d) d = {};
|
||||
d = bricks.extend(d, p);
|
||||
self.peers[p.id] = d;
|
||||
})
|
||||
return;
|
||||
}
|
||||
if (data.type == 'logout'){
|
||||
if (data.type == 'new_session'){
|
||||
var peers = {};
|
||||
Object.keys(this.peers).forEach(k =>{
|
||||
if (k != data.msgfrom.id){
|
||||
|
Loading…
Reference in New Issue
Block a user