From ebd2f0e73f359fc386fd7a425ac31adc00bbb673 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Thu, 29 Dec 2016 17:31:49 +0000 Subject: [PATCH 1/2] Update ws dependency to 1.1.1 for security --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 22518cb59..5c4895a66 100644 --- a/package.json +++ b/package.json @@ -35,7 +35,7 @@ "pako": "^1.0.0", "superagent": "^3.3.0", "tweetnacl": "^0.14.0", - "ws": "^1.1.0" + "ws": "^1.1.1" }, "peerDependencies": { "erlpack": "hammerandchisel/erlpack#master", From 22b1c425ac132b0ff715cdbca4120eff5585d373 Mon Sep 17 00:00:00 2001 From: Gus Caplan Date: Thu, 29 Dec 2016 12:58:39 -0600 Subject: [PATCH 2/2] add ClientUser.settings (#1041) * add user settings * Update Ready.js --- src/client/websocket/packets/handlers/Ready.js | 1 + src/structures/ClientUser.js | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/src/client/websocket/packets/handlers/Ready.js b/src/client/websocket/packets/handlers/Ready.js index 10bc6b257..6a644ea17 100644 --- a/src/client/websocket/packets/handlers/Ready.js +++ b/src/client/websocket/packets/handlers/Ready.js @@ -10,6 +10,7 @@ class ReadyHandler extends AbstractHandler { client.ws.heartbeat(); const clientUser = new ClientUser(client, data.user); + clientUser.settings = data.user_settings; client.user = clientUser; client.readyAt = new Date(); client.users.set(clientUser.id, clientUser); diff --git a/src/structures/ClientUser.js b/src/structures/ClientUser.js index d526af6a7..35ec22bde 100644 --- a/src/structures/ClientUser.js +++ b/src/structures/ClientUser.js @@ -43,6 +43,13 @@ class ClientUser extends User { * @type {Collection} */ this.notes = new Collection(); + + /** + * Discord client settings, such as guild positions + * This is only filled when using a user account. + * @type {Object} + */ + this.settings = {}; } edit(data) {