From 61ad9475de1c47a9298d415b030aa44803d5a197 Mon Sep 17 00:00:00 2001 From: Frangu Vlad Date: Fri, 13 Apr 2018 09:27:53 +0300 Subject: [PATCH] fix(ClientManager): patch ClientUser's presence with ClientOption's one (#2458) --- src/client/ClientManager.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/client/ClientManager.js b/src/client/ClientManager.js index f1891e0ce..2a081e3a7 100644 --- a/src/client/ClientManager.js +++ b/src/client/ClientManager.js @@ -41,7 +41,9 @@ class ClientManager { const timeout = this.client.setTimeout(() => reject(new Error('WS_CONNECTION_TIMEOUT')), 1000 * 300); this.client.api.gateway.get().then(async res => { if (this.client.options.presence != null) { // eslint-disable-line eqeqeq - this.client.options.ws.presence = await this.client.presences._parse(this.client.options.presence); + const presence = await this.client.presences._parse(this.client.options.presence); + this.client.options.ws.presence = presence; + this.client.presences.clientPresence.patch(presence); } const gateway = `${res.url}/`; this.client.emit(Events.DEBUG, `Using gateway ${gateway}`);