mirror of
https://github.com/schlagmichdoch/PairDrop.git
synced 2025-04-24 00:36:17 -04:00
Notify clients only once of empty buddy-list
This commit is contained in:
parent
3b7298a330
commit
b66340e1dd
1 changed files with 9 additions and 1 deletions
|
@ -126,7 +126,15 @@ exports.create = function(server) {
|
|||
isSystemEvent: true,
|
||||
type: 'buddies'
|
||||
};
|
||||
client.socket.send(msg);
|
||||
if (buddies.length) {
|
||||
client.socket.send(msg);
|
||||
client.notifiedEmpty = false;
|
||||
return;
|
||||
}
|
||||
if (!client.notifiedEmpty) {
|
||||
client.notifiedEmpty = true;
|
||||
client.socket.send(msg);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue