mirror of
https://github.com/RobinLinus/snapdrop.git
synced 2025-05-15 23:20:11 -07:00
Notify clients only once of empty buddy-list
This commit is contained in:
parent
3b7298a330
commit
b66340e1dd
@ -126,7 +126,15 @@ exports.create = function(server) {
|
||||
isSystemEvent: true,
|
||||
type: 'buddies'
|
||||
};
|
||||
if (buddies.length) {
|
||||
client.socket.send(msg);
|
||||
client.notifiedEmpty = false;
|
||||
return;
|
||||
}
|
||||
if (!client.notifiedEmpty) {
|
||||
client.notifiedEmpty = true;
|
||||
client.socket.send(msg);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user