add way more friend shit (#815)

This commit is contained in:
Gus Caplan
2016-10-22 15:25:55 -05:00
committed by Schuyler Cebulskie
parent 9f7c630796
commit 422b90c711
9 changed files with 106 additions and 3 deletions

View File

@@ -0,0 +1,19 @@
const AbstractHandler = require('./AbstractHandler');
class RelationshipRemoveHandler extends AbstractHandler {
handle(packet) {
const client = this.packetManager.client;
const data = packet.d;
if (data.type === 2) {
if (client.user.blocked.has(data.id)) {
client.user.blocked.delete(data.id);
}
} else if (data.type === 1) {
if (client.user.friends.has(data.id)) {
client.user.friends.delete(data.id);
}
}
}
}
module.exports = RelationshipRemoveHandler;